Files
rust/tests/ui/proc-macro/quote/not-repeatable.rs
lcnr 6b379b560d use try_structurally_resolve_type for method receiver
We'll still error due to the `opt_bad_ty` of `method_autoderef_steps`.
This slightly worsens the span of `infer_var.method()` which is now the
same as for `Box::new(infer_var).method()`.

Unlike `structurally_resolve_type`, `probe_op` does not check whether
the infcx is already tainted, so this results in 2 previously not emitted
errors.
2025-09-26 16:33:15 +02:00

15 lines
321 B
Rust

#![feature(proc_macro_quote)]
extern crate proc_macro;
use proc_macro::quote;
struct Ipv4Addr;
fn main() {
let ip = Ipv4Addr;
let _ = quote! { $($ip)* };
//~^ ERROR the method `quote_into_iter` exists for struct `Ipv4Addr`, but its trait bounds were not satisfied
//~| ERROR type annotations needed
}