forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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#96134 - Dylan-DPC:rollup-ejug3yq, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - rust-lang#95346 (Stablize `const_extern_fn` for "Rust" and "C") - rust-lang#95933 (htmldocck: Compare HTML tree instead of plain text html) - rust-lang#96105 (Make the debug output for `TargetSelection` less verbose) - rust-lang#96112 (Strict provenance lint diagnostics improvements) - rust-lang#96119 (update Miri) - rust-lang#96124 (to_digit tweak) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
12 changed files
with
185 additions
and
100 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
17 changes: 10 additions & 7 deletions
17
src/test/ui/consts/const-extern-fn/feature-gate-const_extern_fn.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 |
---|---|---|
@@ -1,10 +1,13 @@ | ||
// Check that `const extern fn` and `const unsafe extern fn` are feature-gated. | ||
// Check that `const extern fn` and `const unsafe extern fn` are feature-gated | ||
// for certain ABIs. | ||
|
||
const extern fn foo1() {} //~ ERROR `const extern fn` definitions are unstable | ||
const extern "C" fn foo2() {} //~ ERROR `const extern fn` definitions are unstable | ||
const extern "Rust" fn foo3() {} //~ ERROR `const extern fn` definitions are unstable | ||
const unsafe extern fn bar1() {} //~ ERROR `const extern fn` definitions are unstable | ||
const unsafe extern "C" fn bar2() {} //~ ERROR `const extern fn` definitions are unstable | ||
const unsafe extern "Rust" fn bar3() {} //~ ERROR `const extern fn` definitions are unstable | ||
const extern fn foo1() {} | ||
const extern "C" fn foo2() {} | ||
const extern "Rust" fn foo3() {} | ||
const extern "cdecl" fn foo4() {} //~ ERROR `cdecl` as a `const fn` ABI is unstable | ||
const unsafe extern fn bar1() {} | ||
const unsafe extern "C" fn bar2() {} | ||
const unsafe extern "Rust" fn bar3() {} | ||
const unsafe extern "cdecl" fn bar4() {} //~ ERROR `cdecl` as a `const fn` ABI is unstable | ||
|
||
fn main() {} |
54 changes: 9 additions & 45 deletions
54
src/test/ui/consts/const-extern-fn/feature-gate-const_extern_fn.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 |
---|---|---|
@@ -1,57 +1,21 @@ | ||
error[E0658]: `const extern fn` definitions are unstable | ||
--> $DIR/feature-gate-const_extern_fn.rs:3:1 | ||
error[E0658]: `cdecl` as a `const fn` ABI is unstable | ||
--> $DIR/feature-gate-const_extern_fn.rs:7:14 | ||
| | ||
LL | const extern fn foo1() {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
LL | const extern "cdecl" fn foo4() {} | ||
| ^^^^^^^ | ||
| | ||
= note: see issue #64926 <https://github.com/rust-lang/rust/issues/64926> for more information | ||
= help: add `#![feature(const_extern_fn)]` to the crate attributes to enable | ||
|
||
error[E0658]: `const extern fn` definitions are unstable | ||
--> $DIR/feature-gate-const_extern_fn.rs:4:1 | ||
error[E0658]: `cdecl` as a `const fn` ABI is unstable | ||
--> $DIR/feature-gate-const_extern_fn.rs:11:21 | ||
| | ||
LL | const extern "C" fn foo2() {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
LL | const unsafe extern "cdecl" fn bar4() {} | ||
| ^^^^^^^ | ||
| | ||
= note: see issue #64926 <https://github.com/rust-lang/rust/issues/64926> for more information | ||
= help: add `#![feature(const_extern_fn)]` to the crate attributes to enable | ||
|
||
error[E0658]: `const extern fn` definitions are unstable | ||
--> $DIR/feature-gate-const_extern_fn.rs:5:1 | ||
| | ||
LL | const extern "Rust" fn foo3() {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #64926 <https://github.com/rust-lang/rust/issues/64926> for more information | ||
= help: add `#![feature(const_extern_fn)]` to the crate attributes to enable | ||
|
||
error[E0658]: `const extern fn` definitions are unstable | ||
--> $DIR/feature-gate-const_extern_fn.rs:6:1 | ||
| | ||
LL | const unsafe extern fn bar1() {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #64926 <https://github.com/rust-lang/rust/issues/64926> for more information | ||
= help: add `#![feature(const_extern_fn)]` to the crate attributes to enable | ||
|
||
error[E0658]: `const extern fn` definitions are unstable | ||
--> $DIR/feature-gate-const_extern_fn.rs:7:1 | ||
| | ||
LL | const unsafe extern "C" fn bar2() {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #64926 <https://github.com/rust-lang/rust/issues/64926> for more information | ||
= help: add `#![feature(const_extern_fn)]` to the crate attributes to enable | ||
|
||
error[E0658]: `const extern fn` definitions are unstable | ||
--> $DIR/feature-gate-const_extern_fn.rs:8:1 | ||
| | ||
LL | const unsafe extern "Rust" fn bar3() {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #64926 <https://github.com/rust-lang/rust/issues/64926> for more information | ||
= help: add `#![feature(const_extern_fn)]` to the crate attributes to enable | ||
|
||
error: aborting due to 6 previous errors | ||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |
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
Oops, something went wrong.