Skip to content

Commit

Permalink
Auto merge of rust-lang#127982 - matthiaskrgr:rollup-nzyvphj, r=matth…
Browse files Browse the repository at this point in the history
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#127295 (CFI: Support provided methods on traits)
 - rust-lang#127814 (`C-cmse-nonsecure-call`: improved error messages)
 - rust-lang#127949 (fix: explain E0120 better cover cases when its raised)
 - rust-lang#127966 (Use structured suggestions for unconstrained generic parameters on impl blocks)
 - rust-lang#127976 (Lazy type aliases: Diagostics: Detect bivariant ty params that are only used recursively)
 - rust-lang#127978 (Avoid ref when using format! for perf)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Jul 19, 2024
2 parents 9f20a0f + 00d6fc4 commit 845a2f7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/src/fmt/builders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> {
/// assert_eq!(format!("{}", value), "a");
/// assert_eq!(format!("{:?}", value), "'a'");
///
/// let wrapped = fmt::FormatterFn(|f| write!(f, "{:?}", &value));
/// let wrapped = fmt::FormatterFn(|f| write!(f, "{value:?}"));
/// assert_eq!(format!("{}", wrapped), "'a'");
/// assert_eq!(format!("{:?}", wrapped), "'a'");
/// ```
Expand Down
2 changes: 1 addition & 1 deletion core/tests/future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn test_join() {

let y = String::new();
let x = join!(async {
println!("{}", &y);
println!("{y}");
1
})
.await;
Expand Down
4 changes: 2 additions & 2 deletions proc_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1544,10 +1544,10 @@ impl fmt::Debug for Literal {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Literal")
// format the kind on one line even in {:#?} mode
.field("kind", &format_args!("{:?}", &self.0.kind))
.field("kind", &format_args!("{:?}", self.0.kind))
.field("symbol", &self.0.symbol)
// format `Some("...")` on one line even in {:#?} mode
.field("suffix", &format_args!("{:?}", &self.0.suffix))
.field("suffix", &format_args!("{:?}", self.0.suffix))
.field("span", &self.0.span)
.finish()
}
Expand Down
2 changes: 1 addition & 1 deletion std/src/fs/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ fn recursive_rmdir_toctou() {
let drop_canary_arc = Arc::new(());
let drop_canary_weak = Arc::downgrade(&drop_canary_arc);

eprintln!("x: {:?}", &victim_del_path);
eprintln!("x: {victim_del_path:?}");

// victim just continuously removes `victim_del`
thread::spawn(move || {
Expand Down
2 changes: 1 addition & 1 deletion std/src/io/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ impl Error {
///
/// impl Display for MyError {
/// fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
/// write!(f, "MyError: {}", &self.v)
/// write!(f, "MyError: {}", self.v)
/// }
/// }
///
Expand Down

0 comments on commit 845a2f7

Please sign in to comment.