diff options
| author | Ayrton <a.munoz3327@gmail.com> | 2020-10-06 09:51:10 -0400 |
|---|---|---|
| committer | Ayrton <a.munoz3327@gmail.com> | 2020-10-27 11:04:04 -0400 |
| commit | 511fe048b4ee2535961014b1be3294a771cc7e87 (patch) | |
| tree | 2fb41c1d16b3a455ab2def35bd3ed9a8fbf504b0 /compiler/rustc_span/src | |
| parent | 3214de735969602ddf2625ca500ff8d3ec57a745 (diff) | |
| download | rust-511fe048b4ee2535961014b1be3294a771cc7e87.tar.gz rust-511fe048b4ee2535961014b1be3294a771cc7e87.zip | |
Changed lint to check for `std::fmt::Pointer` and `transmute`
The lint checks arguments in calls to `transmute` or functions that have `Pointer` as a trait bound and displays a warning if the argument is a function reference. Also checks for `std::fmt::Pointer::fmt` to handle formatting macros although it doesn't depend on the exact expansion of the macro or formatting internals. `std::fmt::Pointer` and `std::fmt::Pointer::fmt` were also added as diagnostic items and symbols.
Diffstat (limited to 'compiler/rustc_span/src')
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 080afdcd2c0..ef0f09ae818 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -796,6 +796,8 @@ symbols! { plugin_registrar, plugins, pointer, + pointer_trait, + pointer_trait_fmt, poll, position, post_dash_lto: "post-lto", |
