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#94385 - matthiaskrgr:rollup-4pwegqk, r=matthi…
…askrgr Rollup of 5 pull requests Successful merges: - rust-lang#93603 (Populate liveness facts when calling `get_body_with_borrowck_facts` without `-Z polonius`) - rust-lang#93870 (Fix switch on discriminant detection in a presence of coverage counters) - rust-lang#94355 (Add one more case to avoid ICE) - rust-lang#94363 (Remove needless borrows from core::fmt) - rust-lang#94377 (`check_used` should only look at actual `used` attributes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
11 changed files
with
109 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// check-pass | ||
|
||
#![feature(used_with_arg)] | ||
|
||
#[used(linker)] | ||
#[no_mangle] // accidentally detected as `used(compiler)` | ||
pub static GLOB: usize = 0; | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Checks that code coverage doesn't interfere with const_precise_live_drops. | ||
// Regression test for issue #93848. | ||
// | ||
// check-pass | ||
// compile-flags: --crate-type=lib -Cinstrument-coverage -Zno-profiler-runtime | ||
|
||
#![feature(const_precise_live_drops)] | ||
|
||
#[inline] | ||
pub const fn transpose<T, E>(this: Option<Result<T, E>>) -> Result<Option<T>, E> { | ||
match this { | ||
Some(Ok(x)) => Ok(Some(x)), | ||
Some(Err(e)) => Err(e), | ||
None => Ok(None), | ||
} | ||
} |
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 @@ | ||
use std::collections::VecDeque; | ||
|
||
pub struct BuildPlanBuilder { | ||
acc: VecDeque<(String, String)>, | ||
current_provides: String, | ||
current_requires: String, | ||
} | ||
|
||
impl BuildPlanBuilder { | ||
pub fn or(&mut self) -> &mut Self { | ||
self.acc.push_back(self.current_provides, self.current_requires); | ||
//~^ ERROR this function takes 1 argument but 2 arguments were supplied | ||
self | ||
} | ||
} | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
error[E0061]: this function takes 1 argument but 2 arguments were supplied | ||
--> $DIR/wrong_argument_ice.rs:11:18 | ||
| | ||
LL | self.acc.push_back(self.current_provides, self.current_requires); | ||
| ^^^^^^^^^ --------------------- --------------------- supplied 2 arguments | ||
| | ||
note: associated function defined here | ||
--> $SRC_DIR/alloc/src/collections/vec_deque/mod.rs:LL:COL | ||
| | ||
LL | pub fn push_back(&mut self, value: T) { | ||
| ^^^^^^^^^ | ||
help: use parentheses to construct a tuple | ||
| | ||
LL | self.acc.push_back((self.current_provides, self.current_requires)); | ||
| + + | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0061`. |