Skip to content

Rustup #8728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 29 commits into from
Closed

Rustup #8728

Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bca346b
rebase and use ty::Const in patterns again
b-naber Mar 25, 2022
2f78075
get rid of visit_constant in thir visitor
b-naber Apr 6, 2022
7113135
Merge commit '984330a6ee3c4d15626685d6dc8b7b759ff630bd' into clippyup
flip1995 Apr 7, 2022
da26623
Update Cargo.lock
flip1995 Apr 8, 2022
b79f13e
Avoid looking at the internals of Interned directly
oli-obk Apr 8, 2022
2249168
Refactor HIR item-like traversal (part 1)
kckeiks Apr 3, 2022
3363a62
remove CheckVisitor, CollectExternCrateVisitor and ItemLikeVisitor impls
kckeiks Apr 7, 2022
0155a63
Auto merge of #95524 - oli-obk:cached_stable_hash_cleanups, r=nnether…
bors Apr 9, 2022
62d912e
Add new `Deinit` statement kind
JakobDegen Apr 5, 2022
5b7df24
errors: lazily load fallback fluent bundle
davidtwco Apr 12, 2022
27634b0
Auto merge of #94255 - b-naber:use-mir-constant-in-thir, r=oli-obk
bors Apr 13, 2022
a377ebc
Auto merge of #95968 - davidtwco:translation-lazy-fallback, r=oli-obk
bors Apr 13, 2022
0de314b
Reimplement lowering of sym operands for asm! so that it also works w…
Amanieu Mar 1, 2022
dc97080
Update issue-92893.stderr
ouz-a Apr 14, 2022
6f82524
clippy: Update full path to `CString`
petrochenkov Apr 15, 2022
3d5dc41
Rollup merge of #94849 - ouz-a:master4, r=oli-obk
Dylan-DPC Apr 15, 2022
5cf2920
Auto merge of #94468 - Amanieu:global_asm_sym, r=nagisa
bors Apr 16, 2022
cc25cbd
Auto merge of #95655 - kckeiks:create-hir-crate-items-query, r=cjgillot
bors Apr 17, 2022
e4110cf
Bless clippy.
cjgillot Apr 1, 2022
18a4411
Stop using CRATE_DEF_INDEX.
cjgillot Apr 15, 2022
cb1924a
Auto merge of #95779 - cjgillot:ast-lifetimes-undeclared, r=petrochenkov
bors Apr 17, 2022
60bb2a7
Rollup merge of #96142 - cjgillot:no-crate-def-index, r=petrochenkov
Dylan-DPC Apr 19, 2022
fabc26f
Stop visiting visibility.
cjgillot Feb 13, 2022
abc8eb7
Drop vis in FieldDef.
cjgillot Feb 13, 2022
6ec33df
Drop vis in ImplItem.
cjgillot Feb 13, 2022
04024ba
Drop vis in Item.
cjgillot Feb 13, 2022
ec3afba
Make clippy inspector more precise.
cjgillot Feb 14, 2022
7fb9342
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Apr 28, 2022
a5cc047
Bump nightly version -> 2022-04-28
flip1995 Apr 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reimplement lowering of sym operands for asm! so that it also works w…
…ith global_asm!
Amanieu committed Apr 14, 2022
commit 0de314b3b3d7ac30edfa2bdd6627683d6a19e694
7 changes: 4 additions & 3 deletions clippy_lints/src/loops/never_loop.rs
Original file line number Diff line number Diff line change
@@ -169,13 +169,14 @@ fn never_loop_expr(expr: &Expr<'_>, main_loop_id: HirId) -> NeverLoopResult {
.iter()
.map(|(o, _)| match o {
InlineAsmOperand::In { expr, .. }
| InlineAsmOperand::InOut { expr, .. }
| InlineAsmOperand::Sym { expr } => never_loop_expr(expr, main_loop_id),
| InlineAsmOperand::InOut { expr, .. } => never_loop_expr(expr, main_loop_id),
InlineAsmOperand::Out { expr, .. } => never_loop_expr_all(&mut expr.iter(), main_loop_id),
InlineAsmOperand::SplitInOut { in_expr, out_expr, .. } => {
never_loop_expr_all(&mut once(in_expr).chain(out_expr.iter()), main_loop_id)
},
InlineAsmOperand::Const { .. } => NeverLoopResult::Otherwise,
InlineAsmOperand::Const { .. }
| InlineAsmOperand::SymFn { .. }
| InlineAsmOperand::SymStatic { .. } => NeverLoopResult::Otherwise,
})
.fold(NeverLoopResult::Otherwise, combine_both),
ExprKind::Struct(_, _, None)
23 changes: 20 additions & 3 deletions clippy_lints/src/utils/inspector.rs
Original file line number Diff line number Diff line change
@@ -281,8 +281,9 @@ fn print_expr(cx: &LateContext<'_>, expr: &hir::Expr<'_>, indent: usize) {
for (op, _op_sp) in asm.operands {
match op {
hir::InlineAsmOperand::In { expr, .. }
| hir::InlineAsmOperand::InOut { expr, .. }
| hir::InlineAsmOperand::Sym { expr } => print_expr(cx, expr, indent + 1),
| hir::InlineAsmOperand::InOut { expr, .. } => {
print_expr(cx, expr, indent + 1);
}
hir::InlineAsmOperand::Out { expr, .. } => {
if let Some(expr) = expr {
print_expr(cx, expr, indent + 1);
@@ -294,10 +295,26 @@ fn print_expr(cx: &LateContext<'_>, expr: &hir::Expr<'_>, indent: usize) {
print_expr(cx, out_expr, indent + 1);
}
},
hir::InlineAsmOperand::Const { anon_const } => {
hir::InlineAsmOperand::Const { anon_const }
| hir::InlineAsmOperand::SymFn { anon_const } => {
println!("{}anon_const:", ind);
print_expr(cx, &cx.tcx.hir().body(anon_const.body).value, indent + 1);
},
hir::InlineAsmOperand::SymStatic { path, .. } => {
match path {
hir::QPath::Resolved(ref ty, path) => {
println!("{}Resolved Path, {:?}", ind, ty);
println!("{}path: {:?}", ind, path);
},
hir::QPath::TypeRelative(ty, seg) => {
println!("{}Relative Path, {:?}", ind, ty);
println!("{}seg: {:?}", ind, seg);
},
hir::QPath::LangItem(lang_item, ..) => {
println!("{}Lang Item Path, {:?}", ind, lang_item.name());
},
}
}
}
}
},
3 changes: 2 additions & 1 deletion clippy_utils/src/hir_utils.rs
Original file line number Diff line number Diff line change
@@ -675,7 +675,8 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
}
},
InlineAsmOperand::Const { anon_const } => self.hash_body(anon_const.body),
InlineAsmOperand::Sym { expr } => self.hash_expr(expr),
InlineAsmOperand::SymFn { anon_const } => self.hash_body(anon_const.body),
InlineAsmOperand::SymStatic { path, def_id: _ } => self.hash_qpath(path),
}
}
},