diff options
| author | bors <bors@rust-lang.org> | 2020-01-24 08:32:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-24 08:32:10 +0000 |
| commit | dee12bb2b7d75cce8fc8f21b5d7ea0da920df5e5 (patch) | |
| tree | 3f0255955f4d43f524452b720ab33e6e64825836 /src/librustc | |
| parent | 62f227b3f822a27bd603acede9137bfb49ca8b68 (diff) | |
| parent | 7f8a61d96c5a628ffb88304eb84a85140479ecad (diff) | |
| download | rust-dee12bb2b7d75cce8fc8f21b5d7ea0da920df5e5.tar.gz rust-dee12bb2b7d75cce8fc8f21b5d7ea0da920df5e5.zip | |
Auto merge of #68506 - tmandry:rollup-kz9d33v, r=tmandry
Rollup of 7 pull requests Successful merges: - #68424 (Suggest borrowing `Vec<NonCopy>` in for loop) - #68438 (Account for non-types in substs for opaque type error messages) - #68469 (Avoid overflow in `std::iter::Skip::count`) - #68473 (Enable ASan on Fuchsia) - #68479 (Implement `unused_parens` for block return values) - #68483 (Add my (@flip1995) name to .mailmap) - #68500 (Clear out std, not std tools) Failed merges: r? @ghost
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/ty/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustc/ty/sty.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 0470ab20dc4..e67131b9164 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -2410,7 +2410,7 @@ impl<'tcx> AdtDef { #[inline] pub fn variant_range(&self) -> Range<VariantIdx> { - (VariantIdx::new(0)..VariantIdx::new(self.variants.len())) + VariantIdx::new(0)..VariantIdx::new(self.variants.len()) } /// Computes the discriminant value used by a specific variant. diff --git a/src/librustc/ty/sty.rs b/src/librustc/ty/sty.rs index 13f623aadb1..837b2fcc500 100644 --- a/src/librustc/ty/sty.rs +++ b/src/librustc/ty/sty.rs @@ -529,7 +529,7 @@ impl<'tcx> GeneratorSubsts<'tcx> { pub fn variant_range(&self, def_id: DefId, tcx: TyCtxt<'tcx>) -> Range<VariantIdx> { // FIXME requires optimized MIR let num_variants = tcx.generator_layout(def_id).variant_fields.len(); - (VariantIdx::new(0)..VariantIdx::new(num_variants)) + VariantIdx::new(0)..VariantIdx::new(num_variants) } /// The discriminant for the given variant. Panics if the `variant_index` is |
