Skip to content

Commit 7c21f91

Browse files
committed
Auto merge of rust-lang#8788 - flip1995:rustup, r=xFrednet,flip1995
Rustup r? `@ghost` changelog: move trait_duplication_in_bounds and type_repetition_in_bounds to nursery temporarily. This could already be reverted before the release. Check the Clippy in the Rust repo beta branch when writing this changelog.
2 parents c7a705a + 0062829 commit 7c21f91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+316
-276
lines changed

clippy_dev/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ indoc = "1.0"
1010
itertools = "0.10.1"
1111
opener = "0.5"
1212
shell-escape = "0.1"
13-
tempfile = "3.3"
13+
tempfile = "3.2"
1414
walkdir = "2.3"
1515

1616
[features]

clippy_lints/src/attrs.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use clippy_utils::msrvs;
66
use clippy_utils::source::{first_line_of_span, is_present_in_source, snippet_opt, without_block_comments};
77
use clippy_utils::{extract_msrv_attr, meets_msrv};
88
use if_chain::if_chain;
9-
use rustc_ast::{AttrKind, AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem};
9+
use rustc_ast::{AttrKind, AttrStyle, Attribute, Lit, LitKind, MacArgs, MacArgsEq, MetaItemKind, NestedMetaItem};
1010
use rustc_errors::Applicability;
1111
use rustc_hir::{
1212
Block, Expr, ExprKind, ImplItem, ImplItemKind, Item, ItemKind, StmtKind, TraitFn, TraitItem, TraitItemKind,
@@ -593,6 +593,10 @@ fn check_empty_line_after_outer_attr(cx: &EarlyContext<'_>, item: &rustc_ast::It
593593
};
594594

595595
if attr.style == AttrStyle::Outer {
596+
if let MacArgs::Eq(_, MacArgsEq::Ast(expr)) = &attr_item.args
597+
&& !matches!(expr.kind, rustc_ast::ExprKind::Lit(..)) {
598+
return;
599+
}
596600
if attr_item.args.inner_tokens().is_empty() || !is_present_in_source(cx, attr.span) {
597601
return;
598602
}

clippy_lints/src/case_sensitive_file_extension_comparisons.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use clippy_utils::diagnostics::span_lint_and_help;
22
use if_chain::if_chain;
33
use rustc_ast::ast::LitKind;
4-
use rustc_data_structures::intern::Interned;
54
use rustc_hir::{Expr, ExprKind, PathSegment};
65
use rustc_lint::{LateContext, LateLintPass};
76
use rustc_middle::ty;
@@ -56,8 +55,8 @@ fn check_case_sensitive_file_extension_comparison(ctx: &LateContext<'_>, expr: &
5655
ty::Str => {
5756
return Some(span);
5857
},
59-
ty::Adt(ty::AdtDef(Interned(&ty::AdtDefData { did, .. }, _)), _) => {
60-
if ctx.tcx.is_diagnostic_item(sym::String, did) {
58+
ty::Adt(def, _) => {
59+
if ctx.tcx.is_diagnostic_item(sym::String, def.did()) {
6160
return Some(span);
6261
}
6362
},

clippy_lints/src/cognitive_complexity.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl CognitiveComplexity {
8282

8383
if rust_cc > self.limit.limit() {
8484
let fn_span = match kind {
85-
FnKind::ItemFn(ident, _, _, _) | FnKind::Method(ident, _, _) => ident.span,
85+
FnKind::ItemFn(ident, _, _) | FnKind::Method(ident, _) => ident.span,
8686
FnKind::Closure => {
8787
let header_span = body_span.with_hi(decl.output.span().lo());
8888
let pos = snippet_opt(cx, header_span).and_then(|snip| {

clippy_lints/src/doc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ impl<'tcx> LateLintPass<'tcx> for DocMarkdown {
240240
lint_for_missing_headers(cx, item.def_id, item.span, sig, headers, Some(body_id), fpu.panic_span);
241241
}
242242
},
243-
hir::ItemKind::Impl(ref impl_) => {
243+
hir::ItemKind::Impl(impl_) => {
244244
self.in_trait_impl = impl_.of_trait.is_some();
245245
},
246246
hir::ItemKind::Trait(_, unsafety, ..) => {
@@ -622,7 +622,7 @@ fn check_code(cx: &LateContext<'_>, text: &str, edition: Edition, span: Span) {
622622

623623
let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
624624
let fallback_bundle =
625-
rustc_errors::fallback_fluent_bundle(false).expect("failed to load fallback fluent bundle");
625+
rustc_errors::fallback_fluent_bundle(rustc_errors::DEFAULT_LOCALE_RESOURCES, false);
626626
let emitter = EmitterWriter::new(
627627
Box::new(io::sink()),
628628
None,

clippy_lints/src/enum_variants.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ impl LateLintPass<'_> for EnumVariantNames {
260260
}
261261
// The `module_name_repetitions` lint should only trigger if the item has the module in its
262262
// name. Having the same name is accepted.
263-
if item.vis.node.is_pub() && item_camel.len() > mod_camel.len() {
263+
if cx.tcx.visibility(item.def_id).is_public() && item_camel.len() > mod_camel.len() {
264264
let matching = count_match_start(mod_camel, &item_camel);
265265
let rmatching = count_match_end(mod_camel, &item_camel);
266266
let nchars = mod_camel.chars().count();

clippy_lints/src/exhaustive_items.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ impl LateLintPass<'_> for ExhaustiveItems {
7878
if !attrs.iter().any(|a| a.has_name(sym::non_exhaustive));
7979
then {
8080
let (lint, msg) = if let ItemKind::Struct(ref v, ..) = item.kind {
81-
if v.fields().iter().any(|f| !f.vis.node.is_pub()) {
81+
if v.fields().iter().any(|f| {
82+
let def_id = cx.tcx.hir().local_def_id(f.hir_id);
83+
!cx.tcx.visibility(def_id).is_public()
84+
}) {
8285
// skip structs with private fields
8386
return;
8487
}

clippy_lints/src/functions/must_use.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use super::{DOUBLE_MUST_USE, MUST_USE_CANDIDATE, MUST_USE_UNIT};
2020
pub(super) fn check_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) {
2121
let attrs = cx.tcx.hir().attrs(item.hir_id());
2222
let attr = must_use_attr(attrs);
23-
if let hir::ItemKind::Fn(ref sig, ref _generics, ref body_id) = item.kind {
23+
if let hir::ItemKind::Fn(ref sig, _generics, ref body_id) = item.kind {
2424
let is_public = cx.access_levels.is_exported(item.def_id);
2525
let fn_header_span = item.span.with_hi(sig.decl.output.span().hi());
2626
if let Some(attr) = attr {
@@ -105,12 +105,7 @@ fn check_needless_must_use(
105105
fn_header_span,
106106
"this unit-returning function has a `#[must_use]` attribute",
107107
|diag| {
108-
diag.span_suggestion(
109-
attr.span,
110-
"remove the attribute",
111-
"".into(),
112-
Applicability::MachineApplicable,
113-
);
108+
diag.span_suggestion(attr.span, "remove the attribute", "", Applicability::MachineApplicable);
114109
},
115110
);
116111
} else if attr.value_str().is_none() && is_must_use_ty(cx, return_ty(cx, item_id)) {

clippy_lints/src/functions/not_unsafe_ptr_arg_deref.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ pub(super) fn check_fn<'tcx>(
1717
hir_id: hir::HirId,
1818
) {
1919
let unsafety = match kind {
20-
intravisit::FnKind::ItemFn(_, _, hir::FnHeader { unsafety, .. }, _) => unsafety,
21-
intravisit::FnKind::Method(_, sig, _) => sig.header.unsafety,
20+
intravisit::FnKind::ItemFn(_, _, hir::FnHeader { unsafety, .. }) => unsafety,
21+
intravisit::FnKind::Method(_, sig) => sig.header.unsafety,
2222
intravisit::FnKind::Closure => return,
2323
};
2424

clippy_lints/src/functions/result_unit_err.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use clippy_utils::ty::is_type_diagnostic_item;
1414
use super::RESULT_UNIT_ERR;
1515

1616
pub(super) fn check_item(cx: &LateContext<'_>, item: &hir::Item<'_>) {
17-
if let hir::ItemKind::Fn(ref sig, ref _generics, _) = item.kind {
17+
if let hir::ItemKind::Fn(ref sig, _generics, _) = item.kind {
1818
let is_public = cx.access_levels.is_exported(item.def_id);
1919
let fn_header_span = item.span.with_hi(sig.decl.output.span().hi());
2020
if is_public {

clippy_lints/src/functions/too_many_arguments.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ pub(super) fn check_fn(
2626
header: hir::FnHeader { abi: Abi::Rust, .. },
2727
..
2828
},
29-
_,
3029
)
31-
| intravisit::FnKind::ItemFn(_, _, hir::FnHeader { abi: Abi::Rust, .. }, _) => check_arg_number(
30+
| intravisit::FnKind::ItemFn(_, _, hir::FnHeader { abi: Abi::Rust, .. }) => check_arg_number(
3231
cx,
3332
decl,
3433
span.with_hi(decl.output.span().hi()),

clippy_lints/src/implicit_hasher.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl<'tcx> LateLintPass<'tcx> for ImplicitHasher {
117117
}
118118

119119
match item.kind {
120-
ItemKind::Impl(ref impl_) => {
120+
ItemKind::Impl(impl_) => {
121121
let mut vis = ImplicitHasherTypeVisitor::new(cx);
122122
vis.visit_ty(impl_.self_ty);
123123

@@ -155,7 +155,7 @@ impl<'tcx> LateLintPass<'tcx> for ImplicitHasher {
155155
);
156156
}
157157
},
158-
ItemKind::Fn(ref sig, ref generics, body_id) => {
158+
ItemKind::Fn(ref sig, generics, body_id) => {
159159
let body = cx.tcx.hir().body(body_id);
160160

161161
for ty in sig.decl.inputs {

clippy_lints/src/inherent_impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ impl<'tcx> LateLintPass<'tcx> for MultipleInherentImpl {
119119
fn get_impl_span(cx: &LateContext<'_>, id: LocalDefId) -> Option<Span> {
120120
let id = cx.tcx.hir().local_def_id_to_hir_id(id);
121121
if let Node::Item(&Item {
122-
kind: ItemKind::Impl(ref impl_item),
122+
kind: ItemKind::Impl(impl_item),
123123
span,
124124
..
125125
}) = cx.tcx.hir().get(id)

clippy_lints/src/lib.register_nursery.rs

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
2828
LintId::of(strings::STRING_LIT_AS_BYTES),
2929
LintId::of(suspicious_operation_groupings::SUSPICIOUS_OPERATION_GROUPINGS),
3030
LintId::of(trailing_empty_array::TRAILING_EMPTY_ARRAY),
31+
LintId::of(trait_bounds::TRAIT_DUPLICATION_IN_BOUNDS),
32+
LintId::of(trait_bounds::TYPE_REPETITION_IN_BOUNDS),
3133
LintId::of(transmute::TRANSMUTE_UNDEFINED_REPR),
3234
LintId::of(transmute::USELESS_TRANSMUTE),
3335
LintId::of(use_self::USE_SELF),

clippy_lints/src/lib.register_pedantic.rs

-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
8484
LintId::of(semicolon_if_nothing_returned::SEMICOLON_IF_NOTHING_RETURNED),
8585
LintId::of(stable_sort_primitive::STABLE_SORT_PRIMITIVE),
8686
LintId::of(strings::STRING_ADD_ASSIGN),
87-
LintId::of(trait_bounds::TRAIT_DUPLICATION_IN_BOUNDS),
88-
LintId::of(trait_bounds::TYPE_REPETITION_IN_BOUNDS),
8987
LintId::of(transmute::TRANSMUTE_PTR_TO_PTR),
9088
LintId::of(types::LINKEDLIST),
9189
LintId::of(types::OPTION_OPTION),

clippy_lints/src/lifetimes.rs

+38-33
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustc_hir::FnRetTy::Return;
1010
use rustc_hir::{
1111
BareFnTy, BodyId, FnDecl, GenericArg, GenericBound, GenericParam, GenericParamKind, Generics, Impl, ImplItem,
1212
ImplItemKind, Item, ItemKind, LangItem, Lifetime, LifetimeName, ParamName, PolyTraitRef, TraitBoundModifier,
13-
TraitFn, TraitItem, TraitItemKind, Ty, TyKind, WhereClause, WherePredicate,
13+
TraitFn, TraitItem, TraitItemKind, Ty, TyKind, WherePredicate,
1414
};
1515
use rustc_lint::{LateContext, LateLintPass};
1616
use rustc_middle::hir::nested_filter as middle_nested_filter;
@@ -85,9 +85,9 @@ declare_lint_pass!(Lifetimes => [NEEDLESS_LIFETIMES, EXTRA_UNUSED_LIFETIMES]);
8585

8686
impl<'tcx> LateLintPass<'tcx> for Lifetimes {
8787
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) {
88-
if let ItemKind::Fn(ref sig, ref generics, id) = item.kind {
88+
if let ItemKind::Fn(ref sig, generics, id) = item.kind {
8989
check_fn_inner(cx, sig.decl, Some(id), None, generics, item.span, true);
90-
} else if let ItemKind::Impl(ref impl_) = item.kind {
90+
} else if let ItemKind::Impl(impl_) = item.kind {
9191
report_extra_impl_lifetimes(cx, impl_);
9292
}
9393
}
@@ -100,7 +100,7 @@ impl<'tcx> LateLintPass<'tcx> for Lifetimes {
100100
sig.decl,
101101
Some(id),
102102
None,
103-
&item.generics,
103+
item.generics,
104104
item.span,
105105
report_extra_lifetimes,
106106
);
@@ -113,7 +113,7 @@ impl<'tcx> LateLintPass<'tcx> for Lifetimes {
113113
TraitFn::Required(sig) => (None, Some(sig)),
114114
TraitFn::Provided(id) => (Some(id), None),
115115
};
116-
check_fn_inner(cx, sig.decl, body, trait_sig, &item.generics, item.span, true);
116+
check_fn_inner(cx, sig.decl, body, trait_sig, item.generics, item.span, true);
117117
}
118118
}
119119
}
@@ -135,7 +135,7 @@ fn check_fn_inner<'tcx>(
135135
span: Span,
136136
report_extra_lifetimes: bool,
137137
) {
138-
if span.from_expansion() || has_where_lifetimes(cx, &generics.where_clause) {
138+
if span.from_expansion() || has_where_lifetimes(cx, generics) {
139139
return;
140140
}
141141

@@ -144,28 +144,35 @@ fn check_fn_inner<'tcx>(
144144
.iter()
145145
.filter(|param| matches!(param.kind, GenericParamKind::Type { .. }));
146146
for typ in types {
147-
for bound in typ.bounds {
148-
let mut visitor = RefVisitor::new(cx);
149-
walk_param_bound(&mut visitor, bound);
150-
if visitor.lts.iter().any(|lt| matches!(lt, RefLt::Named(_))) {
151-
return;
147+
for pred in generics.bounds_for_param(cx.tcx.hir().local_def_id(typ.hir_id)) {
148+
if pred.in_where_clause {
149+
// has_where_lifetimes checked that this predicate contains no lifetime.
150+
continue;
152151
}
153-
if let GenericBound::Trait(ref trait_ref, _) = *bound {
154-
let params = &trait_ref
155-
.trait_ref
156-
.path
157-
.segments
158-
.last()
159-
.expect("a path must have at least one segment")
160-
.args;
161-
if let Some(params) = *params {
162-
let lifetimes = params.args.iter().filter_map(|arg| match arg {
163-
GenericArg::Lifetime(lt) => Some(lt),
164-
_ => None,
165-
});
166-
for bound in lifetimes {
167-
if bound.name != LifetimeName::Static && !bound.is_elided() {
168-
return;
152+
153+
for bound in pred.bounds {
154+
let mut visitor = RefVisitor::new(cx);
155+
walk_param_bound(&mut visitor, bound);
156+
if visitor.lts.iter().any(|lt| matches!(lt, RefLt::Named(_))) {
157+
return;
158+
}
159+
if let GenericBound::Trait(ref trait_ref, _) = *bound {
160+
let params = &trait_ref
161+
.trait_ref
162+
.path
163+
.segments
164+
.last()
165+
.expect("a path must have at least one segment")
166+
.args;
167+
if let Some(params) = *params {
168+
let lifetimes = params.args.iter().filter_map(|arg| match arg {
169+
GenericArg::Lifetime(lt) => Some(lt),
170+
_ => None,
171+
});
172+
for bound in lifetimes {
173+
if bound.name != LifetimeName::Static && !bound.is_elided() {
174+
return;
175+
}
169176
}
170177
}
171178
}
@@ -326,9 +333,7 @@ fn allowed_lts_from(named_generics: &[GenericParam<'_>]) -> FxHashSet<RefLt> {
326333
let mut allowed_lts = FxHashSet::default();
327334
for par in named_generics.iter() {
328335
if let GenericParamKind::Lifetime { .. } = par.kind {
329-
if par.bounds.is_empty() {
330-
allowed_lts.insert(RefLt::Named(par.name.ident().name));
331-
}
336+
allowed_lts.insert(RefLt::Named(par.name.ident().name));
332337
}
333338
}
334339
allowed_lts.insert(RefLt::Unnamed);
@@ -449,8 +454,8 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
449454

450455
/// Are any lifetimes mentioned in the `where` clause? If so, we don't try to
451456
/// reason about elision.
452-
fn has_where_lifetimes<'tcx>(cx: &LateContext<'tcx>, where_clause: &'tcx WhereClause<'_>) -> bool {
453-
for predicate in where_clause.predicates {
457+
fn has_where_lifetimes<'tcx>(cx: &LateContext<'tcx>, generics: &'tcx Generics<'_>) -> bool {
458+
for predicate in generics.predicates {
454459
match *predicate {
455460
WherePredicate::RegionPredicate(..) => return true,
456461
WherePredicate::BoundPredicate(ref pred) => {
@@ -565,7 +570,7 @@ fn report_extra_impl_lifetimes<'tcx>(cx: &LateContext<'tcx>, impl_: &'tcx Impl<'
565570
.collect();
566571
let mut checker = LifetimeChecker::<middle_nested_filter::All>::new(cx, hs);
567572

568-
walk_generics(&mut checker, &impl_.generics);
573+
walk_generics(&mut checker, impl_.generics);
569574
if let Some(ref trait_ref) = impl_.of_trait {
570575
walk_trait_ref(&mut checker, trait_ref);
571576
}

clippy_lints/src/loops/needless_range_loop.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub(super) fn check<'tcx>(
5959
if let Some(indexed_extent) = indexed_extent {
6060
let parent_def_id = cx.tcx.hir().get_parent_item(expr.hir_id);
6161
let region_scope_tree = cx.tcx.region_scope_tree(parent_def_id);
62-
let pat_extent = region_scope_tree.var_scope(pat.hir_id.local_id);
62+
let pat_extent = region_scope_tree.var_scope(pat.hir_id.local_id).unwrap();
6363
if region_scope_tree.is_subscope_of(indexed_extent, pat_extent) {
6464
return;
6565
}
@@ -262,7 +262,7 @@ impl<'a, 'tcx> VarVisitor<'a, 'tcx> {
262262
match res {
263263
Res::Local(hir_id) => {
264264
let parent_def_id = self.cx.tcx.hir().get_parent_item(expr.hir_id);
265-
let extent = self.cx.tcx.region_scope_tree(parent_def_id).var_scope(hir_id.local_id);
265+
let extent = self.cx.tcx.region_scope_tree(parent_def_id).var_scope(hir_id.local_id).unwrap();
266266
if index_used_directly {
267267
self.indexed_directly.insert(
268268
seqvar.segments[0].ident.name,

clippy_lints/src/loops/never_loop.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,16 @@ fn never_loop_expr(expr: &Expr<'_>, main_loop_id: HirId) -> NeverLoopResult {
168168
.operands
169169
.iter()
170170
.map(|(o, _)| match o {
171-
InlineAsmOperand::In { expr, .. }
172-
| InlineAsmOperand::InOut { expr, .. }
173-
| InlineAsmOperand::Sym { expr } => never_loop_expr(expr, main_loop_id),
171+
InlineAsmOperand::In { expr, .. } | InlineAsmOperand::InOut { expr, .. } => {
172+
never_loop_expr(expr, main_loop_id)
173+
},
174174
InlineAsmOperand::Out { expr, .. } => never_loop_expr_all(&mut expr.iter(), main_loop_id),
175175
InlineAsmOperand::SplitInOut { in_expr, out_expr, .. } => {
176176
never_loop_expr_all(&mut once(in_expr).chain(out_expr.iter()), main_loop_id)
177177
},
178-
InlineAsmOperand::Const { .. } => NeverLoopResult::Otherwise,
178+
InlineAsmOperand::Const { .. }
179+
| InlineAsmOperand::SymFn { .. }
180+
| InlineAsmOperand::SymStatic { .. } => NeverLoopResult::Otherwise,
179181
})
180182
.fold(NeverLoopResult::Otherwise, combine_both),
181183
ExprKind::Struct(_, _, None)

clippy_lints/src/manual_non_exhaustive.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,10 @@ impl<'tcx> LateLintPass<'tcx> for ManualNonExhaustiveEnum {
177177
&& let [.., name] = p.segments
178178
&& let Res::Def(DefKind::Ctor(CtorOf::Variant, CtorKind::Const), id) = p.res
179179
&& name.ident.as_str().starts_with('_')
180-
&& let Some(variant_id) = cx.tcx.parent(id)
181-
&& let Some(enum_id) = cx.tcx.parent(variant_id)
182180
{
181+
let variant_id = cx.tcx.parent(id);
182+
let enum_id = cx.tcx.parent(variant_id);
183+
183184
self.constructed_enum_variants.insert((enum_id, variant_id));
184185
}
185186
}

clippy_lints/src/matches/overlapping_arms.rs

-2
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ fn all_ranges<'tcx>(cx: &LateContext<'tcx>, arms: &'tcx [Arm<'_>], ty: Ty<'tcx>)
4040
Some(rhs) => constant(cx, cx.typeck_results(), rhs)?.0,
4141
None => miri_to_const(ty.numeric_max_val(cx.tcx)?)?,
4242
};
43-
4443
let lhs_val = lhs_const.int_value(cx, ty)?;
4544
let rhs_val = rhs_const.int_value(cx, ty)?;
46-
4745
let rhs_bound = match range_end {
4846
RangeEnd::Included => EndBound::Included(rhs_val),
4947
RangeEnd::Excluded => EndBound::Excluded(rhs_val),

0 commit comments

Comments
 (0)