-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
#[rustc_box]
usage in the vec![]
macro
- Loading branch information
Showing
11 changed files
with
80 additions
and
49 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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#![allow(warnings)] | ||
|
||
const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010 | ||
const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR cannot call non-const fn | ||
//~| ERROR cannot call non-const fn | ||
fn main() {} |
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 |
---|---|---|
@@ -1,14 +1,33 @@ | ||
error: expected pattern, found `#` | ||
error[E0658]: usage of qualified paths in this context is experimental | ||
--> $DIR/vec-macro-in-pattern.rs:7:14 | ||
| | ||
LL | Some(vec![43]) => {} | ||
| ^^^^^^^^ | ||
| | | ||
| expected pattern | ||
| in this macro invocation | ||
| this macro call doesn't expand to a pattern | ||
| | ||
= note: see issue #86935 <https://github.com/rust-lang/rust/issues/86935> for more information | ||
= help: add `#![feature(more_qualified_paths)]` to the crate attributes to enable | ||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date | ||
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to 1 previous error | ||
error[E0164]: expected tuple struct or tuple variant, found associated function `<[_]>::into_vec` | ||
--> $DIR/vec-macro-in-pattern.rs:7:14 | ||
| | ||
LL | Some(vec![43]) => {} | ||
| ^^^^^^^^ `fn` calls are not allowed in patterns | ||
| | ||
= help: for more information, visit https://doc.rust-lang.org/book/ch19-00-patterns.html | ||
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error[E0164]: expected tuple struct or tuple variant, found associated function `::alloc::boxed::Box::new` | ||
--> $DIR/vec-macro-in-pattern.rs:7:14 | ||
| | ||
LL | Some(vec![43]) => {} | ||
| ^^^^^^^^ `fn` calls are not allowed in patterns | ||
| | ||
= help: for more information, visit https://doc.rust-lang.org/book/ch19-00-patterns.html | ||
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
Some errors have detailed explanations: E0164, E0658. | ||
For more information about an error, try `rustc --explain E0164`. |
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