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.
15 lines
321 B
Rust
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
|
|
}
|