From c0d68d2769b9f783982bf63d3bb0a4cd202ca02e Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 3 Apr 2019 07:30:08 -0700 Subject: [PATCH] Include trailing comma in multiline Debug representation This commit changes the behavior of Formatter::debug_struct, debug_tuple, debug_list, debug_set, and debug_map to render trailing commas in {:#?} mode, which is the dominant style in modern Rust code. Before: Language { name: "Rust", trailing_commas: false } After: Language { name: "Rust", trailing_commas: true, } --- src/libcore/fmt/builders.rs | 90 +++++-------- src/libcore/tests/fmt/builders.rs | 52 ++++---- .../escape-argument-callee.stderr | 2 +- .../escape-argument.stderr | 2 +- .../escape-upvar-nested.stderr | 4 +- .../escape-upvar-ref.stderr | 2 +- ...pagate-approximated-fail-no-postdom.stderr | 2 +- .../propagate-approximated-ref.stderr | 2 +- ...er-to-static-comparing-against-free.stderr | 4 +- ...oximated-shorter-to-static-no-bound.stderr | 2 +- ...mated-shorter-to-static-wrong-bound.stderr | 2 +- .../propagate-approximated-val.stderr | 2 +- .../propagate-despite-same-free-region.stderr | 2 +- ...ail-to-approximate-longer-no-bounds.stderr | 2 +- ...-to-approximate-longer-wrong-bounds.stderr | 2 +- .../propagate-from-trait-match.stderr | 4 +- .../return-wrong-bound-region.stderr | 2 +- .../projection-no-regions-closure.stderr | 16 +-- .../projection-one-region-closure.stderr | 16 +-- ...tion-one-region-trait-bound-closure.stderr | 20 +-- ...e-region-trait-bound-static-closure.stderr | 20 +-- ...tion-two-region-trait-bound-closure.stderr | 32 ++--- ...ram-closure-approximate-lower-bound.stderr | 8 +- ...m-closure-outlives-from-return-type.stderr | 4 +- ...-closure-outlives-from-where-clause.stderr | 16 +-- .../dollar-crate-issue-57089.stdout | 40 +++--- src/test/ui/proc-macro/dollar-crate.stdout | 120 +++++++++--------- .../dbg-macro-expected-behavior.rs | 8 +- 28 files changed, 226 insertions(+), 252 deletions(-) diff --git a/src/libcore/fmt/builders.rs b/src/libcore/fmt/builders.rs index 45994c2b4f0f0..df3852973b8dd 100644 --- a/src/libcore/fmt/builders.rs +++ b/src/libcore/fmt/builders.rs @@ -11,7 +11,7 @@ impl<'a> PadAdapter<'a> { fmt.wrap_buf(move |buf| { *slot = Some(PadAdapter { buf, - on_newline: false, + on_newline: true, }); slot.as_mut().unwrap() }) @@ -128,22 +128,21 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> { #[stable(feature = "debug_builders", since = "1.2.0")] pub fn field(&mut self, name: &str, value: &dyn fmt::Debug) -> &mut DebugStruct<'a, 'b> { self.result = self.result.and_then(|_| { - let prefix = if self.has_fields { - "," - } else { - " {" - }; - if self.is_pretty() { + if !self.has_fields { + self.fmt.write_str(" {\n")?; + } let mut slot = None; let mut writer = PadAdapter::wrap(&mut self.fmt, &mut slot); - writer.write_str(prefix)?; - writer.write_str("\n")?; writer.write_str(name)?; writer.write_str(": ")?; - value.fmt(&mut writer) + value.fmt(&mut writer)?; + writer.write_str(",\n") } else { - write!(self.fmt, "{} {}: ", prefix, name)?; + let prefix = if self.has_fields { ", " } else { " { " }; + self.fmt.write_str(prefix)?; + self.fmt.write_str(name)?; + self.fmt.write_str(": ")?; value.fmt(self.fmt) } }); @@ -184,7 +183,7 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> { if self.has_fields { self.result = self.result.and_then(|_| { if self.is_pretty() { - self.fmt.write_str("\n}") + self.fmt.write_str("}") } else { self.fmt.write_str(" }") } @@ -275,21 +274,17 @@ impl<'a, 'b: 'a> DebugTuple<'a, 'b> { #[stable(feature = "debug_builders", since = "1.2.0")] pub fn field(&mut self, value: &dyn fmt::Debug) -> &mut DebugTuple<'a, 'b> { self.result = self.result.and_then(|_| { - let (prefix, space) = if self.fields > 0 { - (",", " ") - } else { - ("(", "") - }; - if self.is_pretty() { + if self.fields == 0 { + self.fmt.write_str("(\n")?; + } let mut slot = None; let mut writer = PadAdapter::wrap(&mut self.fmt, &mut slot); - writer.write_str(prefix)?; - writer.write_str("\n")?; - value.fmt(&mut writer) + value.fmt(&mut writer)?; + writer.write_str(",\n") } else { + let prefix = if self.fields == 0 { "(" } else { ", " }; self.fmt.write_str(prefix)?; - self.fmt.write_str(space)?; value.fmt(self.fmt) } }); @@ -326,10 +321,7 @@ impl<'a, 'b: 'a> DebugTuple<'a, 'b> { pub fn finish(&mut self) -> fmt::Result { if self.fields > 0 { self.result = self.result.and_then(|_| { - if self.is_pretty() { - self.fmt.write_str("\n")?; - } - if self.fields == 1 && self.empty_name { + if self.fields == 1 && self.empty_name && !self.is_pretty() { self.fmt.write_str(",")?; } self.fmt.write_str(")") @@ -353,14 +345,13 @@ impl<'a, 'b: 'a> DebugInner<'a, 'b> { fn entry(&mut self, entry: &dyn fmt::Debug) { self.result = self.result.and_then(|_| { if self.is_pretty() { + if !self.has_fields { + self.fmt.write_str("\n")?; + } let mut slot = None; let mut writer = PadAdapter::wrap(&mut self.fmt, &mut slot); - writer.write_str(if self.has_fields { - ",\n" - } else { - "\n" - })?; - entry.fmt(&mut writer) + entry.fmt(&mut writer)?; + writer.write_str(",\n") } else { if self.has_fields { self.fmt.write_str(", ")? @@ -372,15 +363,6 @@ impl<'a, 'b: 'a> DebugInner<'a, 'b> { self.has_fields = true; } - pub fn finish(&mut self) { - let prefix = if self.is_pretty() && self.has_fields { - "\n" - } else { - "" - }; - self.result = self.result.and_then(|_| self.fmt.write_str(prefix)); - } - fn is_pretty(&self) -> bool { self.fmt.alternate() } @@ -421,7 +403,7 @@ pub struct DebugSet<'a, 'b: 'a> { } pub fn debug_set_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugSet<'a, 'b> { - let result = write!(fmt, "{{"); + let result = fmt.write_str("{"); DebugSet { inner: DebugInner { fmt, @@ -519,7 +501,6 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> { /// ``` #[stable(feature = "debug_builders", since = "1.2.0")] pub fn finish(&mut self) -> fmt::Result { - self.inner.finish(); self.inner.result.and_then(|_| self.inner.fmt.write_str("}")) } } @@ -559,7 +540,7 @@ pub struct DebugList<'a, 'b: 'a> { } pub fn debug_list_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugList<'a, 'b> { - let result = write!(fmt, "["); + let result = fmt.write_str("["); DebugList { inner: DebugInner { fmt, @@ -657,7 +638,6 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> { /// ``` #[stable(feature = "debug_builders", since = "1.2.0")] pub fn finish(&mut self) -> fmt::Result { - self.inner.finish(); self.inner.result.and_then(|_| self.inner.fmt.write_str("]")) } } @@ -699,7 +679,7 @@ pub struct DebugMap<'a, 'b: 'a> { } pub fn debug_map_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugMap<'a, 'b> { - let result = write!(fmt, "{{"); + let result = fmt.write_str("{"); DebugMap { fmt, result, @@ -734,16 +714,15 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> { pub fn entry(&mut self, key: &dyn fmt::Debug, value: &dyn fmt::Debug) -> &mut DebugMap<'a, 'b> { self.result = self.result.and_then(|_| { if self.is_pretty() { + if !self.has_fields { + self.fmt.write_str("\n")?; + } let mut slot = None; let mut writer = PadAdapter::wrap(&mut self.fmt, &mut slot); - writer.write_str(if self.has_fields { - ",\n" - } else { - "\n" - })?; key.fmt(&mut writer)?; writer.write_str(": ")?; - value.fmt(&mut writer) + value.fmt(&mut writer)?; + writer.write_str(",\n") } else { if self.has_fields { self.fmt.write_str(", ")? @@ -818,12 +797,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> { /// ``` #[stable(feature = "debug_builders", since = "1.2.0")] pub fn finish(&mut self) -> fmt::Result { - let prefix = if self.is_pretty() && self.has_fields { - "\n" - } else { - "" - }; - self.result.and_then(|_| write!(self.fmt, "{}}}", prefix)) + self.result.and_then(|_| self.fmt.write_str("}")) } fn is_pretty(&self) -> bool { diff --git a/src/libcore/tests/fmt/builders.rs b/src/libcore/tests/fmt/builders.rs index fd7192cc15119..e4b75fe1fa265 100644 --- a/src/libcore/tests/fmt/builders.rs +++ b/src/libcore/tests/fmt/builders.rs @@ -30,7 +30,7 @@ mod debug_struct { assert_eq!("Foo { bar: true }", format!("{:?}", Foo)); assert_eq!( "Foo { - bar: true + bar: true, }", format!("{:#?}", Foo)); } @@ -52,7 +52,7 @@ mod debug_struct { assert_eq!( "Foo { bar: true, - baz: 10/20 + baz: 10/20, }", format!("{:#?}", Foo)); } @@ -87,9 +87,9 @@ mod debug_struct { "Bar { foo: Foo { bar: true, - baz: 10/20 + baz: 10/20, }, - hello: \"world\" + hello: \"world\", }", format!("{:#?}", Bar)); } @@ -127,7 +127,7 @@ mod debug_tuple { assert_eq!("Foo(true)", format!("{:?}", Foo)); assert_eq!( "Foo( - true + true, )", format!("{:#?}", Foo)); } @@ -149,7 +149,7 @@ mod debug_tuple { assert_eq!( "Foo( true, - 10/20 + 10/20, )", format!("{:#?}", Foo)); } @@ -184,9 +184,9 @@ mod debug_tuple { "Bar( Foo( true, - 10/20 + 10/20, ), - \"world\" + \"world\", )", format!("{:#?}", Bar)); } @@ -224,7 +224,7 @@ mod debug_map { assert_eq!("{\"bar\": true}", format!("{:?}", Foo)); assert_eq!( "{ - \"bar\": true + \"bar\": true, }", format!("{:#?}", Foo)); } @@ -246,7 +246,7 @@ mod debug_map { assert_eq!( "{ \"bar\": true, - 10: 10/20 + 10: 10/20, }", format!("{:#?}", Foo)); } @@ -282,12 +282,12 @@ mod debug_map { "{ \"foo\": { \"bar\": true, - 10: 10/20 + 10: 10/20, }, { \"bar\": true, - 10: 10/20 - }: \"world\" + 10: 10/20, + }: \"world\", }", format!("{:#?}", Bar)); } @@ -325,7 +325,7 @@ mod debug_set { assert_eq!("{true}", format!("{:?}", Foo)); assert_eq!( "{ - true + true, }", format!("{:#?}", Foo)); } @@ -347,7 +347,7 @@ mod debug_set { assert_eq!( "{ true, - 10/20 + 10/20, }", format!("{:#?}", Foo)); } @@ -382,9 +382,9 @@ mod debug_set { "{ { true, - 10/20 + 10/20, }, - \"world\" + \"world\", }", format!("{:#?}", Bar)); } @@ -422,7 +422,7 @@ mod debug_list { assert_eq!("[true]", format!("{:?}", Foo)); assert_eq!( "[ - true + true, ]", format!("{:#?}", Foo)); } @@ -444,7 +444,7 @@ mod debug_list { assert_eq!( "[ true, - 10/20 + 10/20, ]", format!("{:#?}", Foo)); } @@ -479,9 +479,9 @@ mod debug_list { "[ [ true, - 10/20 + 10/20, ], - \"world\" + \"world\", ]", format!("{:#?}", Bar)); } @@ -513,31 +513,31 @@ fn test_formatting_parameters_are_forwarded() { assert_eq!(format!("{:#03?}", struct_), " Foo { bar: 1024, - baz: 007 + baz: 007, } ".trim()); assert_eq!(format!("{:#03?}", tuple), " ( 1024, - 007 + 007, ) ".trim()); assert_eq!(format!("{:#03?}", list), " [ 1024, - 007 + 007, ] ".trim()); assert_eq!(format!("{:#03?}", map), r#" { "bar": 1024, - "baz": 007 + "baz": 007, } "#.trim()); assert_eq!(format!("{:#03?}", set), " { 007, - 1024 + 1024, } ".trim()); } diff --git a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr index 46de13dbbbd9b..20041389b3c38 100644 --- a/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr +++ b/src/test/ui/nll/closure-requirements/escape-argument-callee.stderr @@ -6,7 +6,7 @@ LL | let mut closure = expect_sig(|p, y| *p = y); | = note: defining type: DefId(0/1:9 ~ escape_argument_callee[317d]::test[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's, 't0> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) i32)) + for<'r, 's, 't0> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) i32)), ] error: lifetime may not live long enough diff --git a/src/test/ui/nll/closure-requirements/escape-argument.stderr b/src/test/ui/nll/closure-requirements/escape-argument.stderr index d47b326f48ed5..b08ec9539318a 100644 --- a/src/test/ui/nll/closure-requirements/escape-argument.stderr +++ b/src/test/ui/nll/closure-requirements/escape-argument.stderr @@ -6,7 +6,7 @@ LL | let mut closure = expect_sig(|p, y| *p = y); | = note: defining type: DefId(0/1:9 ~ escape_argument[317d]::test[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32)) + for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32)), ] note: No external requirements diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr index dec4a6b811fcd..7178b22bb5f2d 100644 --- a/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr +++ b/src/test/ui/nll/closure-requirements/escape-upvar-nested.stderr @@ -8,7 +8,7 @@ LL | let mut closure1 = || p = &y; i16, extern "rust-call" fn(()), &'_#1r mut &'_#2r i32, - &'_#3r i32 + &'_#3r i32, ] = note: number of external vids: 4 = note: where '_#3r: '_#2r @@ -27,7 +27,7 @@ LL | | }; i16, extern "rust-call" fn(()), &'_#1r mut &'_#2r i32, - &'_#3r i32 + &'_#3r i32, ] = note: number of external vids: 4 = note: where '_#3r: '_#2r diff --git a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr b/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr index 55ede6ed4aae9..d129f945f252a 100644 --- a/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr +++ b/src/test/ui/nll/closure-requirements/escape-upvar-ref.stderr @@ -8,7 +8,7 @@ LL | let mut closure = || p = &y; i16, extern "rust-call" fn(()), &'_#1r mut &'_#2r i32, - &'_#3r i32 + &'_#3r i32, ] = note: number of external vids: 4 = note: where '_#3r: '_#2r diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr index 7eb4d96fc5f75..4db1f04077043 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr @@ -10,7 +10,7 @@ LL | | }, | = note: defining type: DefId(0/1:20 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)) + for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)), ] = note: late-bound region is '_#4r = note: late-bound region is '_#5r diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr index a1a1024bccd5b..7dedae715bea0 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr @@ -11,7 +11,7 @@ LL | | }); | = note: defining type: DefId(0/1:18 ~ propagate_approximated_ref[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>)) + for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>)), ] = note: late-bound region is '_#3r = note: late-bound region is '_#4r diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr index ad2a5cae62e00..b2d7fd8df6d33 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr @@ -10,7 +10,7 @@ LL | | }) | = note: defining type: DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]) with closure substs [ i32, - for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>)) + for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>)), ] error[E0521]: borrowed data escapes outside of closure @@ -48,7 +48,7 @@ LL | | }) | = note: defining type: DefId(0/1:13 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]::{{closure}}[0]) with closure substs [ i32, - for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>)) + for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>)), ] = note: number of external vids: 2 = note: where '_#1r: '_#0r diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr index f5167c2197b3e..e30e2dfee6301 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr @@ -12,7 +12,7 @@ LL | | }); | = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) u32>)) + for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) u32>)), ] = note: late-bound region is '_#2r = note: late-bound region is '_#3r diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr index b4e1b0d224769..ec608590a7104 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr @@ -12,7 +12,7 @@ LL | | }); | = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>)) + for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>)), ] = note: late-bound region is '_#3r = note: late-bound region is '_#4r diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr index 6ab2104a51c65..223c29f596922 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr @@ -11,7 +11,7 @@ LL | | }); | = note: defining type: DefId(0/1:18 ~ propagate_approximated_val[317d]::test[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)) + for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)), ] = note: late-bound region is '_#3r = note: late-bound region is '_#4r diff --git a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr index 79f0df9a6888e..d618b4d06a1d8 100644 --- a/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.stderr @@ -10,7 +10,7 @@ LL | | }, | = note: defining type: DefId(0/1:16 ~ propagate_despite_same_free_region[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)) + for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)), ] = note: late-bound region is '_#3r = note: number of external vids: 4 diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr index f8b6bfa003b32..07fb4d0d5e3ae 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr @@ -11,7 +11,7 @@ LL | | }); | = note: defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)) + for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)), ] = note: late-bound region is '_#2r = note: late-bound region is '_#3r diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr index 7e7429405fa06..a0744c27db72c 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.stderr @@ -11,7 +11,7 @@ LL | | }); | = note: defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>)) + for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>)), ] = note: late-bound region is '_#3r = note: late-bound region is '_#4r diff --git a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr index c2bbd8138142d..282246f81666b 100644 --- a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr @@ -15,7 +15,7 @@ LL | | }); '_#1r, T, i32, - extern "rust-call" fn((T,)) + extern "rust-call" fn((T,)), ] = note: number of external vids: 2 = note: where T: '_#1r @@ -34,7 +34,7 @@ LL | | } | = note: defining type: DefId(0/0:6 ~ propagate_from_trait_match[317d]::supply[0]) with substs [ '_#1r, - T + T, ] error[E0309]: the parameter type `T` may not live long enough diff --git a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr index d5bfa3f9894d0..c5645413c77cd 100644 --- a/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr +++ b/src/test/ui/nll/closure-requirements/return-wrong-bound-region.stderr @@ -6,7 +6,7 @@ LL | expect_sig(|a, b| b); // ought to return `a` | = note: defining type: DefId(0/1:9 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]) with closure substs [ i16, - for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32)) -> &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32 + for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32)) -> &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32, ] error: lifetime may not live long enough diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr index a7679aac219fd..cda1f7d36311c 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr @@ -8,7 +8,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) '_#1r, T, i32, - extern "rust-call" fn((std::boxed::Box,)) -> std::boxed::Box<(dyn Anything + '_#2r)> + extern "rust-call" fn((std::boxed::Box,)) -> std::boxed::Box<(dyn Anything + '_#2r)>, ] = note: number of external vids: 3 = note: where ::Item: '_#2r @@ -27,7 +27,7 @@ LL | | } | = note: defining type: DefId(0/0:6 ~ projection_no_regions_closure[317d]::no_region[0]) with substs [ '_#1r, - T + T, ] error[E0309]: the associated type `::Item` may not live long enough @@ -48,7 +48,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) '_#1r, T, i32, - extern "rust-call" fn((std::boxed::Box,)) -> std::boxed::Box<(dyn Anything + '_#2r)> + extern "rust-call" fn((std::boxed::Box,)) -> std::boxed::Box<(dyn Anything + '_#2r)>, ] = note: number of external vids: 3 = note: where ::Item: '_#2r @@ -66,7 +66,7 @@ LL | | } | = note: defining type: DefId(0/0:7 ~ projection_no_regions_closure[317d]::correct_region[0]) with substs [ '_#1r, - T + T, ] note: External requirements @@ -80,7 +80,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) '_#2r, T, i32, - extern "rust-call" fn((std::boxed::Box,)) -> std::boxed::Box<(dyn Anything + '_#3r)> + extern "rust-call" fn((std::boxed::Box,)) -> std::boxed::Box<(dyn Anything + '_#3r)>, ] = note: number of external vids: 4 = note: where ::Item: '_#3r @@ -100,7 +100,7 @@ LL | | } = note: defining type: DefId(0/0:8 ~ projection_no_regions_closure[317d]::wrong_region[0]) with substs [ '_#1r, '_#2r, - T + T, ] error[E0309]: the associated type `::Item` may not live long enough @@ -122,7 +122,7 @@ LL | with_signature(x, |mut y| Box::new(y.next())) '_#2r, T, i32, - extern "rust-call" fn((std::boxed::Box,)) -> std::boxed::Box<(dyn Anything + '_#3r)> + extern "rust-call" fn((std::boxed::Box,)) -> std::boxed::Box<(dyn Anything + '_#3r)>, ] = note: number of external vids: 4 = note: where ::Item: '_#3r @@ -142,7 +142,7 @@ LL | | } = note: defining type: DefId(0/0:9 ~ projection_no_regions_closure[317d]::outlives_region[0]) with substs [ '_#1r, '_#2r, - T + T, ] error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr index 7ba7164b35b84..9d716006500b7 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr @@ -8,7 +8,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#1r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)), ] = note: late-bound region is '_#3r = note: number of external vids: 4 @@ -29,7 +29,7 @@ LL | | } | = note: defining type: DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]) with substs [ '_#1r, - T + T, ] error[E0309]: the parameter type `T` may not live long enough @@ -62,7 +62,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#2r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), ] = note: number of external vids: 4 = note: where T: '_#3r @@ -83,7 +83,7 @@ LL | | } = note: defining type: DefId(0/0:9 ~ projection_one_region_closure[317d]::no_relationships_early[0]) with substs [ '_#1r, '_#2r, - T + T, ] error[E0309]: the parameter type `T` may not live long enough @@ -116,7 +116,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#2r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), ] = note: number of external vids: 4 = note: where >::AssocType: '_#3r @@ -136,7 +136,7 @@ LL | | } = note: defining type: DefId(0/0:10 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [ '_#1r, '_#2r, - T + T, ] note: External requirements @@ -150,7 +150,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#2r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), ] = note: number of external vids: 4 = note: where T: '_#3r @@ -171,7 +171,7 @@ LL | | } = note: defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [ '_#1r, '_#2r, - T + T, ] error: aborting due to 4 previous errors diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr index 63ead49adfcb4..0fa4060137a3f 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr @@ -8,7 +8,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#1r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)), ] = note: late-bound region is '_#3r = note: number of external vids: 4 @@ -28,7 +28,7 @@ LL | | } | = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [ '_#1r, - T + T, ] error: lifetime may not live long enough @@ -53,7 +53,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#2r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), ] = note: number of external vids: 4 = note: where '_#2r: '_#3r @@ -73,7 +73,7 @@ LL | | } = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [ '_#1r, '_#2r, - T + T, ] error: lifetime may not live long enough @@ -98,7 +98,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#2r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), ] = note: number of external vids: 4 = note: where >::AssocType: '_#3r @@ -118,7 +118,7 @@ LL | | } = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [ '_#1r, '_#2r, - T + T, ] note: External requirements @@ -132,7 +132,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#2r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), ] = note: number of external vids: 4 = note: where '_#2r: '_#3r @@ -152,7 +152,7 @@ LL | | } = note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]) with substs [ '_#1r, '_#2r, - T + T, ] note: External requirements @@ -165,7 +165,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#1r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)), ] = note: number of external vids: 3 = note: where '_#1r: '_#2r @@ -184,7 +184,7 @@ LL | | } | = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [ '_#1r, - T + T, ] error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr index 61f8132cf490c..f616a7feae3f0 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr @@ -8,7 +8,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#1r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)), ] = note: late-bound region is '_#3r @@ -25,7 +25,7 @@ LL | | } | = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]) with substs [ '_#1r, - T + T, ] note: No external requirements @@ -39,7 +39,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#2r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), ] note: No external requirements @@ -57,7 +57,7 @@ LL | | } = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]) with substs [ '_#1r, '_#2r, - T + T, ] note: No external requirements @@ -71,7 +71,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#2r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), ] note: No external requirements @@ -89,7 +89,7 @@ LL | | } = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]) with substs [ '_#1r, '_#2r, - T + T, ] note: No external requirements @@ -103,7 +103,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#2r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), ] note: No external requirements @@ -121,7 +121,7 @@ LL | | } = note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]) with substs [ '_#1r, '_#2r, - T + T, ] note: No external requirements @@ -134,7 +134,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#1r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)), ] note: No external requirements @@ -151,6 +151,6 @@ LL | | } | = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]) with substs [ '_#1r, - T + T, ] diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr index f5daae286709e..b761b031444da 100644 --- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr @@ -9,7 +9,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#2r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), ] = note: late-bound region is '_#4r = note: number of external vids: 5 @@ -30,7 +30,7 @@ LL | | } = note: defining type: DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [ '_#1r, '_#2r, - T + T, ] error[E0309]: the associated type `>::AssocType` may not live long enough @@ -53,7 +53,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#3r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)), ] = note: number of external vids: 5 = note: where >::AssocType: '_#4r @@ -74,7 +74,7 @@ LL | | } '_#1r, '_#2r, '_#3r, - T + T, ] error[E0309]: the associated type `>::AssocType` may not live long enough @@ -97,7 +97,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#3r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)), ] = note: number of external vids: 5 = note: where >::AssocType: '_#4r @@ -118,7 +118,7 @@ LL | | } '_#1r, '_#2r, '_#3r, - T + T, ] note: External requirements @@ -133,7 +133,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#3r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)), ] = note: number of external vids: 5 = note: where >::AssocType: '_#4r @@ -154,7 +154,7 @@ LL | | } '_#1r, '_#2r, '_#3r, - T + T, ] note: External requirements @@ -169,7 +169,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#3r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)), ] = note: number of external vids: 5 = note: where >::AssocType: '_#4r @@ -190,7 +190,7 @@ LL | | } '_#1r, '_#2r, '_#3r, - T + T, ] note: External requirements @@ -203,7 +203,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#1r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)), ] = note: late-bound region is '_#3r = note: number of external vids: 4 @@ -223,7 +223,7 @@ LL | | } | = note: defining type: DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [ '_#1r, - T + T, ] error: lifetime may not live long enough @@ -248,7 +248,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#2r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), ] = note: number of external vids: 4 = note: where >::AssocType: '_#3r @@ -268,7 +268,7 @@ LL | | } = note: defining type: DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [ '_#1r, '_#2r, - T + T, ] note: External requirements @@ -281,7 +281,7 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); '_#1r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)), ] = note: number of external vids: 3 = note: where >::AssocType: '_#2r @@ -300,7 +300,7 @@ LL | | } | = note: defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [ '_#1r, - T + T, ] error: aborting due to 3 previous errors diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr index 41c2916dca3b7..6f3071becfd0e 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr @@ -7,7 +7,7 @@ LL | twice(cell, value, |a, b| invoke(a, b)); = note: defining type: DefId(0/1:14 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]::{{closure}}[0]) with closure substs [ T, i16, - for<'r, 's> extern "rust-call" fn((std::option::Option>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T)) + for<'r, 's> extern "rust-call" fn((std::option::Option>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T)), ] = note: number of external vids: 2 = note: where T: '_#1r @@ -22,7 +22,7 @@ LL | | } | |_^ | = note: defining type: DefId(0/0:5 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]) with substs [ - T + T, ] note: External requirements @@ -34,7 +34,7 @@ LL | twice(cell, value, |a, b| invoke(a, b)); = note: defining type: DefId(0/1:17 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [ T, i16, - for<'r, 's> extern "rust-call" fn((std::option::Option>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T)) + for<'r, 's> extern "rust-call" fn((std::option::Option>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T)), ] = note: late-bound region is '_#2r = note: number of external vids: 3 @@ -50,7 +50,7 @@ LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]) with substs [ - T + T, ] error[E0309]: the parameter type `T` may not live long enough diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr index 6a201b8523ad3..cdb715762031f 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr @@ -8,7 +8,7 @@ LL | with_signature(x, |y| y) '_#1r, T, i32, - extern "rust-call" fn((std::boxed::Box,)) -> std::boxed::Box<(dyn std::fmt::Debug + '_#2r)> + extern "rust-call" fn((std::boxed::Box,)) -> std::boxed::Box<(dyn std::fmt::Debug + '_#2r)>, ] = note: number of external vids: 3 = note: where T: '_#2r @@ -27,7 +27,7 @@ LL | | } | = note: defining type: DefId(0/0:5 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]) with substs [ '_#1r, - T + T, ] error[E0309]: the parameter type `T` may not live long enough diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr index 4ddc54717fbb1..68798a335f9df 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr @@ -14,7 +14,7 @@ LL | | }) = note: defining type: DefId(0/1:16 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [ T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#1r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#1r ()>, T)), ] = note: late-bound region is '_#2r = note: number of external vids: 3 @@ -33,7 +33,7 @@ LL | | } | |_^ | = note: defining type: DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]) with substs [ - T + T, ] error[E0309]: the parameter type `T` may not live long enough @@ -68,7 +68,7 @@ LL | | }) '_#1r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)), ] = note: number of external vids: 3 = note: where T: '_#2r @@ -87,7 +87,7 @@ LL | | } | = note: defining type: DefId(0/0:7 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]) with substs [ '_#1r, - T + T, ] note: External requirements @@ -105,7 +105,7 @@ LL | | }) '_#1r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)), ] = note: late-bound region is '_#3r = note: number of external vids: 4 @@ -125,7 +125,7 @@ LL | | } | = note: defining type: DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]) with substs [ '_#1r, - T + T, ] error[E0309]: the parameter type `T` may not live long enough @@ -156,7 +156,7 @@ LL | | }) '_#2r, T, i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)), ] = note: number of external vids: 4 = note: where T: '_#3r @@ -176,7 +176,7 @@ LL | | } = note: defining type: DefId(0/0:9 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]) with substs [ '_#1r, '_#2r, - T + T, ] error: aborting due to 2 previous errors diff --git a/src/test/ui/proc-macro/dollar-crate-issue-57089.stdout b/src/test/ui/proc-macro/dollar-crate-issue-57089.stdout index 09340988c8968..618380d7f0bee 100644 --- a/src/test/ui/proc-macro/dollar-crate-issue-57089.stdout +++ b/src/test/ui/proc-macro/dollar-crate-issue-57089.stdout @@ -2,79 +2,79 @@ PROC MACRO INPUT (PRETTY-PRINTED): struct M ( $crate :: S ) ; PROC MACRO INPUT: TokenStream [ Ident { ident: "struct", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Ident { ident: "M", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ':', spacing: Joint, - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ':', spacing: Alone, - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Ident { ident: "S", - span: #2 bytes(LO..HI) - } + span: #2 bytes(LO..HI), + }, ], - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ';', spacing: Alone, - span: #2 bytes(LO..HI) - } + span: #2 bytes(LO..HI), + }, ] ATTRIBUTE INPUT (PRETTY-PRINTED): struct A(crate::S); ATTRIBUTE INPUT: TokenStream [ Ident { ident: "struct", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Ident { ident: "A", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ':', spacing: Joint, - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ':', spacing: Alone, - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Ident { ident: "S", - span: #2 bytes(LO..HI) - } + span: #2 bytes(LO..HI), + }, ], - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ';', spacing: Alone, - span: #2 bytes(LO..HI) - } + span: #2 bytes(LO..HI), + }, ] diff --git a/src/test/ui/proc-macro/dollar-crate.stdout b/src/test/ui/proc-macro/dollar-crate.stdout index c47b3603f41c0..454da53943054 100644 --- a/src/test/ui/proc-macro/dollar-crate.stdout +++ b/src/test/ui/proc-macro/dollar-crate.stdout @@ -2,239 +2,239 @@ PROC MACRO INPUT (PRETTY-PRINTED): struct M ( $crate :: S ) ; PROC MACRO INPUT: TokenStream [ Ident { ident: "struct", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Ident { ident: "M", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ':', spacing: Joint, - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ':', spacing: Alone, - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Ident { ident: "S", - span: #2 bytes(LO..HI) - } + span: #2 bytes(LO..HI), + }, ], - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ';', spacing: Alone, - span: #2 bytes(LO..HI) - } + span: #2 bytes(LO..HI), + }, ] ATTRIBUTE INPUT (PRETTY-PRINTED): struct A(crate::S); ATTRIBUTE INPUT: TokenStream [ Ident { ident: "struct", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Ident { ident: "A", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ':', spacing: Joint, - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ':', spacing: Alone, - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Ident { ident: "S", - span: #2 bytes(LO..HI) - } + span: #2 bytes(LO..HI), + }, ], - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ';', spacing: Alone, - span: #2 bytes(LO..HI) - } + span: #2 bytes(LO..HI), + }, ] DERIVE INPUT (PRETTY-PRINTED): struct D(crate::S); DERIVE INPUT: TokenStream [ Ident { ident: "struct", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Ident { ident: "D", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ':', spacing: Joint, - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ':', spacing: Alone, - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Ident { ident: "S", - span: #2 bytes(LO..HI) - } + span: #2 bytes(LO..HI), + }, ], - span: #2 bytes(LO..HI) + span: #2 bytes(LO..HI), }, Punct { ch: ';', spacing: Alone, - span: #2 bytes(LO..HI) - } + span: #2 bytes(LO..HI), + }, ] PROC MACRO INPUT (PRETTY-PRINTED): struct M ( $crate :: S ) ; PROC MACRO INPUT: TokenStream [ Ident { ident: "struct", - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Ident { ident: "M", - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Punct { ch: ':', spacing: Joint, - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Punct { ch: ':', spacing: Alone, - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Ident { ident: "S", - span: #10 bytes(LO..HI) - } + span: #10 bytes(LO..HI), + }, ], - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Punct { ch: ';', spacing: Alone, - span: #10 bytes(LO..HI) - } + span: #10 bytes(LO..HI), + }, ] ATTRIBUTE INPUT (PRETTY-PRINTED): struct A(::dollar_crate_external::S); ATTRIBUTE INPUT: TokenStream [ Ident { ident: "struct", - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Ident { ident: "A", - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Punct { ch: ':', spacing: Joint, - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Punct { ch: ':', spacing: Alone, - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Ident { ident: "S", - span: #10 bytes(LO..HI) - } + span: #10 bytes(LO..HI), + }, ], - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Punct { ch: ';', spacing: Alone, - span: #10 bytes(LO..HI) - } + span: #10 bytes(LO..HI), + }, ] DERIVE INPUT (PRETTY-PRINTED): struct D(::dollar_crate_external::S); DERIVE INPUT: TokenStream [ Ident { ident: "struct", - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Ident { ident: "D", - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Group { delimiter: Parenthesis, stream: TokenStream [ Ident { ident: "$crate", - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Punct { ch: ':', spacing: Joint, - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Punct { ch: ':', spacing: Alone, - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Ident { ident: "S", - span: #10 bytes(LO..HI) - } + span: #10 bytes(LO..HI), + }, ], - span: #10 bytes(LO..HI) + span: #10 bytes(LO..HI), }, Punct { ch: ';', spacing: Alone, - span: #10 bytes(LO..HI) - } + span: #10 bytes(LO..HI), + }, ] diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs index 67f7f80a9e2da..f1b73ee115db1 100644 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs +++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.rs @@ -64,22 +64,22 @@ fn validate_stderr(stderr: Vec) { ":28] Point{x: 42, y: 24,} = Point {", " x: 42,", - " y: 24", + " y: 24,", "}", ":29] b = Point {", " x: 42,", - " y: 24", + " y: 24,", "}", ":37]", ":41] &a = NoCopy(", - " 1337", + " 1337,", ")", ":41] dbg!(& a) = NoCopy(", - " 1337", + " 1337,", ")", ":46] f(&42) = 42",