-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #68321 - cuviper:beta-next, r=Dylan-DPC
Beta backports - expect `fn` after `const unsafe` / `const extern` #68073 - Do not ICE on unicode next point #68084 - rustdoc: Don't allow `#![feature(...)]` on stable or beta #67989 r? @Mark-Simulacrum
- Loading branch information
Showing
21 changed files
with
116 additions
and
23 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
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
7 changes: 7 additions & 0 deletions
7
src/test/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier-2.rs
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,7 @@ | ||
fn main() {} | ||
|
||
#[cfg(FALSE)] | ||
fn container() { | ||
const unsafe WhereIsFerris Now() {} | ||
//~^ ERROR expected one of `extern` or `fn` | ||
} |
8 changes: 8 additions & 0 deletions
8
...st/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier-2.stderr
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,8 @@ | ||
error: expected one of `extern` or `fn`, found `WhereIsFerris` | ||
--> $DIR/issue-68062-const-extern-fns-dont-need-fn-specifier-2.rs:5:18 | ||
| | ||
LL | const unsafe WhereIsFerris Now() {} | ||
| ^^^^^^^^^^^^^ expected one of `extern` or `fn` | ||
|
||
error: aborting due to previous error | ||
|
8 changes: 8 additions & 0 deletions
8
src/test/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier.rs
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,8 @@ | ||
fn main() {} | ||
|
||
#[cfg(FALSE)] | ||
fn container() { | ||
const extern "Rust" PUT_ANYTHING_YOU_WANT_HERE bug() -> usize { 1 } | ||
//~^ ERROR expected `fn` | ||
//~| ERROR `const extern fn` definitions are unstable | ||
} |
18 changes: 18 additions & 0 deletions
18
...test/ui/consts/const-extern-fn/issue-68062-const-extern-fns-dont-need-fn-specifier.stderr
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,18 @@ | ||
error: expected `fn`, found `PUT_ANYTHING_YOU_WANT_HERE` | ||
--> $DIR/issue-68062-const-extern-fns-dont-need-fn-specifier.rs:5:25 | ||
| | ||
LL | const extern "Rust" PUT_ANYTHING_YOU_WANT_HERE bug() -> usize { 1 } | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `fn` | ||
|
||
error[E0658]: `const extern fn` definitions are unstable | ||
--> $DIR/issue-68062-const-extern-fns-dont-need-fn-specifier.rs:5:5 | ||
| | ||
LL | const extern "Rust" PUT_ANYTHING_YOU_WANT_HERE bug() -> usize { 1 } | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: for more information, see https://github.com/rust-lang/rust/issues/64926 | ||
= help: add `#![feature(const_extern_fn)]` to the crate attributes to enable | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |
6 changes: 6 additions & 0 deletions
6
src/test/ui/issues/issue-68000-unicode-ident-after-missing-comma.rs
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,6 @@ | ||
pub struct Foo { | ||
pub bar: Vec<i32>ö | ||
//~^ ERROR expected `,`, or `}`, found `ö` | ||
} //~ ERROR expected `:`, found `}` | ||
|
||
fn main() {} |
17 changes: 17 additions & 0 deletions
17
src/test/ui/issues/issue-68000-unicode-ident-after-missing-comma.stderr
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,17 @@ | ||
error: expected `,`, or `}`, found `ö` | ||
--> $DIR/issue-68000-unicode-ident-after-missing-comma.rs:2:22 | ||
| | ||
LL | pub bar: Vec<i32>ö | ||
| ^ help: try adding a comma: `,` | ||
|
||
error: expected `:`, found `}` | ||
--> $DIR/issue-68000-unicode-ident-after-missing-comma.rs:4:1 | ||
| | ||
LL | pub bar: Vec<i32>ö | ||
| - expected `:` | ||
LL | | ||
LL | } | ||
| ^ unexpected token | ||
|
||
error: aborting due to 2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
macro_rules! x { | ||
($($c:tt)*) => { | ||
$($c)ö* {} //~ ERROR missing condition for `if` expression | ||
}; | ||
} | ||
|
||
fn main() { | ||
x!(if); | ||
} |
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,8 @@ | ||
error: missing condition for `if` expression | ||
--> $DIR/issue-68091-unicode-ident-after-if.rs:3:14 | ||
| | ||
LL | $($c)ö* {} | ||
| ^ expected if condition here | ||
|
||
error: aborting due to previous error | ||
|
9 changes: 9 additions & 0 deletions
9
src/test/ui/issues/issue-68092-unicode-ident-after-incomplete-expr.rs
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,9 @@ | ||
macro_rules! x { | ||
($($c:tt)*) => { | ||
$($c)ö* //~ ERROR macro expansion ends with an incomplete expression: expected expression | ||
}; | ||
} | ||
|
||
fn main() { | ||
x!(!); | ||
} |
8 changes: 8 additions & 0 deletions
8
src/test/ui/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr
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,8 @@ | ||
error: macro expansion ends with an incomplete expression: expected expression | ||
--> $DIR/issue-68092-unicode-ident-after-incomplete-expr.rs:3:14 | ||
| | ||
LL | $($c)ö* | ||
| ^ expected expression | ||
|
||
error: aborting due to previous error | ||
|