- 20 6月, 2022 26 次提交
-
-
由 bors 提交于
Obligation forest tweaks A few minor improvements to the code. r? `@nikomatsakis`
-
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #98183 (Fix pretty printing of empty bound lists in where-clause) - #98268 (Improve `lifetime arguments are not allowed on` error message) - #98273 (Fix minor documentation typo) - #98274 (Minor improvements on error for `Self` type in items that don't allow it) - #98281 (Fix typo in `HashMap::drain` docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Yuki Okushi 提交于
Fix typo in `HashMap::drain` docs It's a map, not a vector. Fixes #98275.
-
由 Yuki Okushi 提交于
Minor improvements on error for `Self` type in items that don't allow it Fixes #93796
-
由 Yuki Okushi 提交于
Fix minor documentation typo Fixes incorrect pluralisation of `crate` in documentation for rustc_trait_selection
-
由 Yuki Okushi 提交于
Improve `lifetime arguments are not allowed on` error message Actually mention what thing we're improperly trying to add lifetime generics to.
-
由 Yuki Okushi 提交于
Fix pretty printing of empty bound lists in where-clause Repro: ```rust macro_rules! assert_item_stringify { ($item:item $expected:literal) => { assert_eq!(stringify!($item), $expected); }; } fn main() { assert_item_stringify! { fn f<'a, T>() where 'a:, T: {} "fn f<'a, T>() where 'a:, T: {}" } } ``` Previously this assertion would fail because rustc renders the where-clause as `where 'a, T` which is invalid syntax. This PR makes the above assertion pass. This bug also affects `-Zunpretty=expanded`. The intention is for that to emit syntactically valid code, but the buggy output is not valid Rust syntax. ```console $ rustc <(echo "fn f<'a, T>() where 'a:, T: {}") -Zunpretty=expanded #![feature(prelude_import)] #![no_std] #[prelude_import] use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; fn f<'a, T>() where 'a, T {} ``` ```console $ rustc <(echo "fn f<'a, T>() where 'a:, T: {}") -Zunpretty=expanded | rustc - error: expected `:`, found `,` --> <anon>:7:23 | 7 | fn f<'a, T>() where 'a, T {} | ^ expected `:` ```
-
由 nils 提交于
It's a map, not a vector.
-
由 bors 提交于
Make missing argument placeholder more obvious that it's a placeholder Use `/* ty */` instead of `{ty}`, since people might be misled into thinking that this is valid syntax, and not just a diagnostic placeholder. Fixes #96880
-
由 bors 提交于
Fix `SourceScope` for `if let` bindings. Fixes #97799. I'm not sure how to test this properly, is there any way to observe the difference in behavior apart from `ui` tests? I'm worried that they would be overlooked in the case of a regression.
-
由 Michael Goulet 提交于
-
由 Michael Goulet 提交于
-
由 Peter Hebden 提交于
Incorrect pluralisation of `crate`
-
由 Michael Goulet 提交于
-
由 bors 提交于
Rollup of 4 pull requests Successful merges: - #95534 (Add `core::mem::copy` to complement `core::mem::drop`.) - #97912 (Stabilize `Path::try_exists()` and improve doc) - #98225 (Make debug_triple depend on target json file content rather than file path) - #98257 (Fix typos in `IntoFuture` docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Yuki Okushi 提交于
Fix typos in `IntoFuture` docs
-
由 Yuki Okushi 提交于
Make debug_triple depend on target json file content rather than file path This ensures that changes to target json files will force a recompilation. And more importantly that moving the files doesn't force a recompilation. This should fix https://github.com/Rust-for-Linux/linux/issues/792 (cc ``@ojeda)``
-
由 Yuki Okushi 提交于
Stabilize `Path::try_exists()` and improve doc This stabilizes the `Path::try_exists()` method which returns `Result<bool, io::Error>` instead of `bool` allowing handling of errors unrelated to the file not existing. (e.g permission errors) Along with the stabilization it also: * Warns that the `exists()` method is error-prone and suggests to use the newly stabilized one. * Suggests it instead of `metadata()` to handle errors. * Mentions TOCTOU bugs to avoid false assumption that `try_exists()` is completely safe fixed version of `exists()`. * Renames the feature of still-unstable `std::fs::try_exists()` to `fs_try_exists` to avoid name conflict. The tracking issue #83186 remains open to track `fs_try_exists`.
-
由 Yuki Okushi 提交于
Add `core::mem::copy` to complement `core::mem::drop`. This is useful for combinators. I didn't add `clone` since you can already use `Clone::clone` in its place; copy has no such corresponding function.
-
由 bors 提交于
Make "Assemble stage1 compiler" orders of magnitude faster (take 2) This used to take upwards of 5 seconds for me locally. I found that the culprit was copying the downloaded LLVM shared object: ``` [22:28:03] Install "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/ci-llvm/lib/libLLVM-14-rust-1.62.0-nightly.so" to "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libLLVM-14-rust-1.62.0-nightly.so" [22:28:09] c Sysroot { compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu) } } ``` It turned out that `install()` used full copies unconditionally. Change it to try using a hard-link before falling back to copying. - Panic if we generate a symbolic link in a tarball - Change install to use copy internally, like in my previous PR - Change copy to dereference symbolic links, which avoids the previous regression in #96803. I also took the liberty of fixing `x dist llvm-tools` to work even if you don't call `x build` previously.
-
由 Michael Goulet 提交于
-
由 Joshua Nelson 提交于
This is useful for combinators. I didn't add `clone` since you can already use `Clone::clone` in its place; copy has no such corresponding function.
-
由 Joshua Nelson 提交于
This used to take upwards of 5 seconds for me locally. I found that the culprit was copying the downloaded LLVM shared object: ``` [22:28:03] Install "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/ci-llvm/lib/libLLVM-14-rust-1.62.0-nightly.so" to "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libLLVM-14-rust-1.62.0-nightly.so" [22:28:09] c Sysroot { compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu) } } ``` It turned out that `install()` used full copies unconditionally. Change it to use `copy()` internally, which uses hard links instead when available. Note that this has a change in behavior: Installing a file will also change permissions on the source, not just the destination, if hard links are used. To avoid changing the behavior on symlinks for existing code, I introduce a new function `copy_internal` which only dereferences symlinks when told to do so.
-
由 Joshua Nelson 提交于
This avoids regressions in rustup-toolchain-install-master
-
由 bors 提交于
Move RegionKind to rustc_type_ir (Also UniverseIndex) r? rust-lang/types
-
由 bors 提交于
proc_macro/bridge: remove `#[repr(C)]` from non-ABI-relevant types. Not sure how this happened, maybe some of these were passed through the bridge a long time ago? r? `@bjorn3`
-
- 19 6月, 2022 14 次提交
-
-
由 bjorn3 提交于
-
由 KaDiWa4 提交于
-
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #98105 (rustdoc: remove tuple link on round braces) - #98136 (Rename `impl_constness` to `constness`) - #98146 (Remove --memory-init-file flag when linking with Emscripten) - #98219 (Skip late bound regions in GATSubstCollector) - #98233 (Remove accidental uses of `&A: Allocator`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Dylan DPC 提交于
Remove accidental uses of `&A: Allocator` Cc https://github.com/rust-lang/rust/issues/98232 Fixes https://github.com/rust-lang/rust/issues/98176 (for real this time)
-
由 Dylan DPC 提交于
Skip late bound regions in GATSubstCollector #93227 liberated late bound regions when collecting GAT substs in wfcheck. It should simply skip late bound regions instead. r? ``@compiler-errors``
-
由 Dylan DPC 提交于
Remove --memory-init-file flag when linking with Emscripten This flag does nothing. It only applies when generating asmjs JavaScript. ``@sbc100``
-
由 Dylan DPC 提交于
Rename `impl_constness` to `constness` The current code is a basis for `is_const_fn_raw`, and `impl_constness` is no longer a valid name, which is previously used for determining the constness of impls, and not items in general. r? `@oli-obk`
-
由 Dylan DPC 提交于
rustdoc: remove tuple link on round braces This is #98069 but for tuples. The reasoning is the same: * This PR also changes it so that tuples with all-generic elements still link to the primitive.tuple.html page, just like slices. So there still plenty of on-ramps for anybody who doesn't know about it. * It's too hard to see when round braces are a separate link from the type inside of them. * It's too hard to click even if you do notice them. Before: * impl [ToSocketAddrs](https://doc.rust-lang.org/nightly/std/net/trait.ToSocketAddrs.html) for [(](https://doc.rust-lang.org/nightly/std/primitive.tuple.html)[IpAddr](https://doc.rust-lang.org/nightly/std/net/enum.IpAddr.html), [u16](https://doc.rust-lang.org/nightly/std/primitive.u16.html)[)](https://doc.rust-lang.org/nightly/std/primitive.tuple.html) * impl<K, V> [FromIterator](https://notriddle.com/notriddle-rustdoc-test/std/iter/trait.FromIterator.html)<[(](https://notriddle.com/notriddle-rustdoc-test/std/primitive.tuple.html)K, V[)](https://notriddle.com/notriddle-rustdoc-test/std/primitive.tuple.html)> for [BTreeMap](https://notriddle.com/notriddle-rustdoc-test/std/collections/struct.BTreeMap.html)<K, V> After: * impl [ToSocketAddrs](https://doc.rust-lang.org/nightly/std/net/trait.ToSocketAddrs.html) for ([IpAddr](https://doc.rust-lang.org/nightly/std/net/enum.IpAddr.html), [u16](https://doc.rust-lang.org/nightly/std/primitive.u16.html)) * impl<K, V> [FromIterator](https://notriddle.com/notriddle-rustdoc-test/std/iter/trait.FromIterator.html)<[(K, V)](https://notriddle.com/notriddle-rustdoc-test/std/primitive.tuple.html)> for [BTreeMap](https://notriddle.com/notriddle-rustdoc-test/std/collections/struct.BTreeMap.html)<K, V>
-
由 bors 提交于
Make some lints incremental. Those lints do not track a state, so don't need to be performed for the full crate at once.
-
由 bors 提交于
Make {Mutex, Condvar, RwLock}::new() const. This makes it possible to have `static M: Mutex<_> = Mutex::new(..);`
🎉 Our implementations [on Linux](https://github.com/rust-lang/rust/pull/95035), [on Windows](https://github.com/rust-lang/rust/pull/77380), and various BSDs and some tier 3 platforms have already been using a non-allocating const-constructible implementation. As of https://github.com/rust-lang/rust/pull/97647, the remaining platforms (most notably macOS) now have a const-constructible implementation as well. This means we can finally make these functions publicly const. Tracking issue: https://github.com/rust-lang/rust/issues/93740 -
由 Camille GILLOT 提交于
-
由 Camille GILLOT 提交于
-
由 bors 提交于
Stabilize checked slice->str conversion functions This PR stabilizes the following APIs as `const` functions in Rust 1.63: ```rust // core::str pub const fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error>; impl Utf8Error { pub const fn valid_up_to(&self) -> usize; pub const fn error_len(&self) -> Option<usize>; } ``` Note that the `from_utf8_mut` function is not stabilized as unique references (`&mut _`) are [unstable in const context]. FCP: https://github.com/rust-lang/rust/issues/91006#issuecomment-1134593095 [unstable in const context]: https://github.com/rust-lang/rust/issues/57349
-
由 Jack Huey 提交于
-