Skip to content

Commit c6bfa77

Browse files
authored
Rollup merge of rust-lang#114070 - blyxyas:iter_mut_symbol, r=oli-obk
Add `sym::iter_mut` + `sym::as_mut_ptr` for Clippy We currently have `sym::iter` and `sym::iter_repeat`, this PR adds `sym::iter_mut` as it's useful for rust-lang/rust-clippy#11038 and another Clippy lint, it also adds `sym::as_mut_ptr` as it's useful for rust-lang/rust-clippy#10962.
2 parents 998fd94 + 654b924 commit c6bfa77

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

compiler/rustc_span/src/symbol.rs

+2
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ symbols! {
372372
arm_target_feature,
373373
array,
374374
arrays,
375+
as_mut_ptr,
375376
as_ptr,
376377
as_ref,
377378
as_str,
@@ -858,6 +859,7 @@ symbols! {
858859
item,
859860
item_like_imports,
860861
iter,
862+
iter_mut,
861863
iter_repeat,
862864
iterator_collect_fn,
863865
kcfi,

src/tools/clippy/clippy_lints/src/methods/bytecount.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub(super) fn check<'tcx>(
4545
let haystack = if let ExprKind::MethodCall(path, receiver, [], _) =
4646
filter_recv.kind {
4747
let p = path.ident.name;
48-
if p == sym::iter || p == sym!(iter_mut) {
48+
if p == sym::iter || p == sym::iter_mut {
4949
receiver
5050
} else {
5151
filter_recv

tests/ui/proc-macro/meta-macro-hygiene.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Respanned: TokenStream [Ident { ident: "$crate", span: $DIR/auxiliary/make-macro
1818
use core /* 0#1 */::prelude /* 0#1 */::rust_2018 /* 0#1 */::*;
1919
#[macro_use /* 0#1 */]
2020
extern crate core /* 0#1 */;
21-
extern crate compiler_builtins /* 442 */ as _ /* 0#1 */;
21+
extern crate compiler_builtins /* 443 */ as _ /* 0#1 */;
2222
// Don't load unnecessary hygiene information from std
2323
extern crate std /* 0#0 */;
2424

tests/ui/proc-macro/nonterminal-token-hygiene.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ PRINT-BANG INPUT (DEBUG): TokenStream [
3939
use ::core /* 0#1 */::prelude /* 0#1 */::rust_2015 /* 0#1 */::*;
4040
#[macro_use /* 0#1 */]
4141
extern crate core /* 0#2 */;
42-
extern crate compiler_builtins /* 442 */ as _ /* 0#2 */;
42+
extern crate compiler_builtins /* 443 */ as _ /* 0#2 */;
4343
// Don't load unnecessary hygiene information from std
4444
extern crate std /* 0#0 */;
4545

0 commit comments

Comments
 (0)