forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#87509 - JohnTitor:rollup-8iqn6cl, r=JohnTitor
Rollup of 10 pull requests Successful merges: - rust-lang#86450 (Add flag to configure `large_assignments` lint) - rust-lang#86764 (Avoid ICE on type error recovery) - rust-lang#87354 (Update VxWork's UNIX support) - rust-lang#87427 (get rid of NoMirFor error variant) - rust-lang#87446 (macos current_exe using directly libc instead.) - rust-lang#87494 (fix typo: whenver -> whenever) - rust-lang#87497 (Add long explanation for E0544.) - rust-lang#87499 (Remove ASCII fast path from `rustc_lexer::{is_id_continue, is_id_start}`) - rust-lang#87502 (Update cargo) - rust-lang#87503 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
29 changed files
with
187 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Multiple stability attributes were declared on the same item. | ||
|
||
Erroneous code example: | ||
|
||
```compile_fail,E0544 | ||
#![feature(staged_api)] | ||
#![stable(since = "1.0.0", feature = "rust1")] | ||
#[stable(feature = "rust1", since = "1.0.0")] | ||
#[stable(feature = "test", since = "2.0.0")] // invalid | ||
fn foo() {} | ||
``` | ||
|
||
To fix this issue, ensure that each item has at most one stability attribute. | ||
|
||
``` | ||
#![feature(staged_api)] | ||
#![stable(since = "1.0.0", feature = "rust1")] | ||
#[stable(feature = "test", since = "2.0.0")] // ok! | ||
fn foo() {} | ||
``` | ||
|
||
See the [How Rust is Made and “Nightly Rust”][how-rust-made-nightly] appendix | ||
of the Book and the [Stability attributes][stability-attributes] section of the | ||
Rustc Dev Guide for more details. | ||
|
||
[how-rust-made-nightly]: https://doc.rust-lang.org/book/appendix-07-nightly-rust.html | ||
[stability-attributes]: https://rustc-dev-guide.rust-lang.org/stability.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule book
updated
39 files
Submodule edition-guide
updated
5 files
Submodule reference
updated
17 files
+4 −3 | src/destructors.md | |
+1 −1 | src/dynamically-sized-types.md | |
+2 −2 | src/expressions.md | |
+1 −1 | src/expressions/loop-expr.md | |
+1 −1 | src/expressions/method-call-expr.md | |
+1 −1 | src/glossary.md | |
+46 −16 | src/identifiers.md | |
+1 −1 | src/items/extern-crates.md | |
+1 −1 | src/items/external-blocks.md | |
+1 −1 | src/items/functions.md | |
+3 −3 | src/items/implementations.md | |
+1 −1 | src/items/modules.md | |
+1 −1 | src/lifetime-elision.md | |
+1 −1 | src/names/preludes.md | |
+1 −1 | src/types/closure.md | |
+5 −6 | src/types/slice.md | |
+1 −1 | src/types/tuple.md |
Submodule rustc-dev-guide
updated
2 files
+1 −1 | src/building/bootstrapping.md | |
+9 −3 | src/stabilization_guide.md |
10 changes: 10 additions & 0 deletions
10
src/doc/unstable-book/src/compiler-flags/move-size-limit.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# `move_size_limit` | ||
|
||
-------------------- | ||
|
||
The `-Zmove-size-limit=N` compiler flag enables `large_assignments` lints which | ||
will warn when moving objects whose size exceeds `N` bytes. | ||
|
||
Lint warns only about moves in functions that participate in code generation. | ||
Consequently it will be ineffective for compiler invocatation that emit | ||
metadata only, i.e., `cargo check` like workflows. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
error: moving 10024 bytes | ||
--> $DIR/large_moves.rs:12:13 | ||
| | ||
LL | let x = async { | ||
| _____________^ | ||
LL | | let y = [0; 9999]; | ||
LL | | dbg!(y); | ||
LL | | thing(&y).await; | ||
LL | | dbg!(y); | ||
LL | | }; | ||
| |_____^ value moved from here | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/large_moves.rs:1:9 | ||
| | ||
LL | #![deny(large_assignments)] | ||
| ^^^^^^^^^^^^^^^^^ | ||
|
||
error: moving 10024 bytes | ||
--> $DIR/large_moves.rs:18:14 | ||
| | ||
LL | let z = (x, 42); | ||
| ^ value moved from here | ||
|
||
error: moving 10024 bytes | ||
--> $DIR/large_moves.rs:18:13 | ||
| | ||
LL | let z = (x, 42); | ||
| ^^^^^^^ value moved from here | ||
|
||
error: moving 10024 bytes | ||
--> $DIR/large_moves.rs:20:13 | ||
| | ||
LL | let a = z.0; | ||
| ^^^ value moved from here | ||
|
||
error: aborting due to 4 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
trait Foo<T, T = T> {} | ||
//~^ ERROR the name `T` is already used for a generic parameter in this item's generic parameters | ||
|
||
fn eq<A, B>() { | ||
eq::<dyn, Foo> | ||
//~^ ERROR cannot find type `dyn` in this scope | ||
//~| ERROR missing generics for trait `Foo` | ||
//~| WARN trait objects without an explicit `dyn` are deprecated | ||
//~| WARN this is accepted in the current edition | ||
} | ||
|
||
fn main() {} |
Oops, something went wrong.