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#125593 - workingjubilee:rollup-67qk7di, r=wor…
…kingjubilee Rollup of 8 pull requests Successful merges: - rust-lang#124048 (Support C23's Variadics Without a Named Parameter) - rust-lang#125046 (Only allow immutable statics with #[linkage]) - rust-lang#125466 (Don't continue probing for method if in suggestion and autoderef hits ambiguity) - rust-lang#125469 (Don't skip out of inner const when looking for body for suggestion) - rust-lang#125544 (Also mention my-self for other check-cfg docs changes) - rust-lang#125559 (Simplify the `unchecked_sh[lr]` ub-checks a bit) - rust-lang#125566 (Notify T-rustdoc for beta-accepted and stable-accepted too) - rust-lang#125582 (Avoid a `FieldIdx::from_usize` in InstSimplify) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
26 changed files
with
185 additions
and
139 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
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,6 +1,9 @@ | ||
//@ build-pass | ||
|
||
// Supported since C23 | ||
// https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2975.pdf | ||
extern "C" { | ||
fn foo(...); | ||
//~^ ERROR C-variadic function must be declared with at least one named argument | ||
} | ||
|
||
fn main() {} |
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
//! The symbols are resolved by the linker. It doesn't make sense to change | ||
//! them at runtime, so deny mutable statics with #[linkage]. | ||
|
||
#![feature(linkage)] | ||
|
||
fn main() { | ||
extern "C" { | ||
#[linkage = "weak"] //~ ERROR mutable statics are not allowed with `#[linkage]` | ||
static mut ABC: *const u8; | ||
} | ||
|
||
unsafe { | ||
assert_eq!(ABC as usize, 0); | ||
} | ||
} |
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 @@ | ||
error: mutable statics are not allowed with `#[linkage]` | ||
--> $DIR/linkage-attr-mutable-static.rs:8:9 | ||
| | ||
LL | #[linkage = "weak"] | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: making the static mutable would allow changing which symbol the static references rather than make the target of the symbol mutable | ||
|
||
error: aborting due to 1 previous error | ||
|
16 changes: 16 additions & 0 deletions
16
tests/ui/methods/suggest-method-on-call-for-ambig-receiver.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,16 @@ | ||
// Fix for <https://github.com/rust-lang/rust/issues/125432>. | ||
|
||
fn separate_arms() { | ||
let mut x = None; | ||
match x { | ||
None => { | ||
x = Some(0); | ||
} | ||
Some(right) => { | ||
consume(right); | ||
//~^ ERROR cannot find function `consume` in this scope | ||
} | ||
} | ||
} | ||
|
||
fn main() {} |
9 changes: 9 additions & 0 deletions
9
tests/ui/methods/suggest-method-on-call-for-ambig-receiver.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,9 @@ | ||
error[E0425]: cannot find function `consume` in this scope | ||
--> $DIR/suggest-method-on-call-for-ambig-receiver.rs:10:13 | ||
| | ||
LL | consume(right); | ||
| ^^^^^^^ not found in this scope | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0425`. |
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.