/// stable across compilation session boundaries. More formally:
///
/// ```txt
-/// Ord::cmp(a1, b1) == Ord:cmp(a2, b2)
+/// Ord::cmp(a1, b1) == Ord::cmp(a2, b2)
/// where a2 = decode(encode(a1, context1), context2)
/// b2 = decode(encode(b1, context1), context2)
/// ```
let e = self
.tcx()
.sess
- .delay_span_bug(path.span, "path with `Res:Err` but no error emitted");
+ .delay_span_bug(path.span, "path with `Res::Err` but no error emitted");
self.set_tainted_by_errors(e);
self.tcx().ty_error_with_guaranteed(e)
}
let (res, opt_ty, segments) =
self.resolve_ty_and_res_fully_qualified_call(qpath, pat.hir_id, pat.span);
if res == Res::Err {
- let e = tcx.sess.delay_span_bug(pat.span, "`Res:Err` but no error emitted");
+ let e = tcx.sess.delay_span_bug(pat.span, "`Res::Err` but no error emitted");
self.set_tainted_by_errors(e);
on_error(e);
return tcx.ty_error_with_guaranteed(e);
/// fn main() {
/// let x: String = "3".try_into().unwrap();
/// // ^^^^^^^^
- /// // This call to try_into matches both Foo:try_into and TryInto::try_into as
+ /// // This call to try_into matches both Foo::try_into and TryInto::try_into as
/// // `TryInto` has been added to the Rust prelude in 2021 edition.
/// println!("{x}");
/// }
symbol_table: FxHashMap<Symbol, usize>,
}
-/// If the current crate is a proc-macro, returns early with `Lazy:empty()`.
+/// If the current crate is a proc-macro, returns early with `LazyArray::empty()`.
/// This is useful for skipping the encoding of things that aren't needed
/// for proc-macro crates.
macro_rules! empty_proc_macro {
} else {
return Some(Err(format!(
"'{}' is not a valid value for lld-flavor. \
- Use 'darwin', 'gnu', 'link' or 'wasm.",
+ Use 'darwin', 'gnu', 'link' or 'wasm'.",
s)))
}
Some(Ok(()))
+++ /dev/null
-// run-rustfix
-
-macro_rules! my_wrapper {
- ($expr:expr) => { MyWrapper($expr) }
-}
-
-pub struct MyWrapper(u32);
-
-fn main() {
- let value = MyWrapper(123);
- some_fn(value); //~ ERROR mismatched types
- some_fn(my_wrapper!(123)); //~ ERROR mismatched types
-}
-
-fn some_fn(wrapped: MyWrapper) {
- drop(wrapped);
-}
+++ /dev/null
-// run-rustfix
-
-macro_rules! my_wrapper {
- ($expr:expr) => { MyWrapper($expr) }
-}
-
-pub struct MyWrapper(u32);
-
-fn main() {
- let value = MyWrapper(123);
- some_fn(value.0); //~ ERROR mismatched types
- some_fn(my_wrapper!(123).0); //~ ERROR mismatched types
-}
-
-fn some_fn(wrapped: MyWrapper) {
- drop(wrapped);
-}
+++ /dev/null
-error[E0308]: mismatched types
- --> $DIR/suggest-removing-tulpe-struct-field.rs:11:13
- |
-LL | some_fn(value.0);
- | ------- ^^^^^^^ expected struct `MyWrapper`, found `u32`
- | |
- | arguments to this function are incorrect
- |
-note: function defined here
- --> $DIR/suggest-removing-tulpe-struct-field.rs:15:4
- |
-LL | fn some_fn(wrapped: MyWrapper) {
- | ^^^^^^^ ------------------
-help: consider removing the tuple struct field `0`
- |
-LL - some_fn(value.0);
-LL + some_fn(value);
- |
-
-error[E0308]: mismatched types
- --> $DIR/suggest-removing-tulpe-struct-field.rs:12:13
- |
-LL | some_fn(my_wrapper!(123).0);
- | ------- ^^^^^^^^^^^^^^^^^^ expected struct `MyWrapper`, found `u32`
- | |
- | arguments to this function are incorrect
- |
-note: function defined here
- --> $DIR/suggest-removing-tulpe-struct-field.rs:15:4
- |
-LL | fn some_fn(wrapped: MyWrapper) {
- | ^^^^^^^ ------------------
-help: consider removing the tuple struct field `0`
- |
-LL - some_fn(my_wrapper!(123).0);
-LL + some_fn(my_wrapper!(123));
- |
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
--- /dev/null
+// run-rustfix
+
+macro_rules! my_wrapper {
+ ($expr:expr) => { MyWrapper($expr) }
+}
+
+pub struct MyWrapper(u32);
+
+fn main() {
+ let value = MyWrapper(123);
+ some_fn(value); //~ ERROR mismatched types
+ some_fn(my_wrapper!(123)); //~ ERROR mismatched types
+}
+
+fn some_fn(wrapped: MyWrapper) {
+ drop(wrapped);
+}
--- /dev/null
+// run-rustfix
+
+macro_rules! my_wrapper {
+ ($expr:expr) => { MyWrapper($expr) }
+}
+
+pub struct MyWrapper(u32);
+
+fn main() {
+ let value = MyWrapper(123);
+ some_fn(value.0); //~ ERROR mismatched types
+ some_fn(my_wrapper!(123).0); //~ ERROR mismatched types
+}
+
+fn some_fn(wrapped: MyWrapper) {
+ drop(wrapped);
+}
--- /dev/null
+error[E0308]: mismatched types
+ --> $DIR/suggest-removing-tuple-struct-field.rs:11:13
+ |
+LL | some_fn(value.0);
+ | ------- ^^^^^^^ expected struct `MyWrapper`, found `u32`
+ | |
+ | arguments to this function are incorrect
+ |
+note: function defined here
+ --> $DIR/suggest-removing-tuple-struct-field.rs:15:4
+ |
+LL | fn some_fn(wrapped: MyWrapper) {
+ | ^^^^^^^ ------------------
+help: consider removing the tuple struct field `0`
+ |
+LL - some_fn(value.0);
+LL + some_fn(value);
+ |
+
+error[E0308]: mismatched types
+ --> $DIR/suggest-removing-tuple-struct-field.rs:12:13
+ |
+LL | some_fn(my_wrapper!(123).0);
+ | ------- ^^^^^^^^^^^^^^^^^^ expected struct `MyWrapper`, found `u32`
+ | |
+ | arguments to this function are incorrect
+ |
+note: function defined here
+ --> $DIR/suggest-removing-tuple-struct-field.rs:15:4
+ |
+LL | fn some_fn(wrapped: MyWrapper) {
+ | ^^^^^^^ ------------------
+help: consider removing the tuple struct field `0`
+ |
+LL - some_fn(my_wrapper!(123).0);
+LL + some_fn(my_wrapper!(123));
+ |
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.