about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorkadmin <julianknodt@gmail.com>2022-10-25 08:16:43 +0000
committerkadmin <julianknodt@gmail.com>2022-11-25 09:28:43 +0000
commit5bb1a9febce13dbe7ece9cdb3248b52c1ac44cc5 (patch)
tree7a7c8cd30dd83c745b3c253e0354acb76e6c2e8f /src/test
parentf9750c1554a355a3755a412581c57b230248f06d (diff)
downloadrust-5bb1a9febce13dbe7ece9cdb3248b52c1ac44cc5.tar.gz
rust-5bb1a9febce13dbe7ece9cdb3248b52c1ac44cc5.zip
Add expand_abstract_const
Adds the ability to directly expand a const to an expr without having to deal with intermediate
steps.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/const-generics/issues/issue-83765.rs2
-rw-r--r--src/test/ui/const-generics/issues/issue-83765.stderr20
2 files changed, 1 insertions, 21 deletions
diff --git a/src/test/ui/const-generics/issues/issue-83765.rs b/src/test/ui/const-generics/issues/issue-83765.rs
index 79ca330526f..674efa723cf 100644
--- a/src/test/ui/const-generics/issues/issue-83765.rs
+++ b/src/test/ui/const-generics/issues/issue-83765.rs
@@ -120,8 +120,6 @@ fn main() {
     let v = vec![1, 2, 3];
     let bv = v.lazy_updim([3, 4]);
     let bbv = bv.bmap(|x| x * x);
-    //~^ ERROR mismatched types
 
     println!("The size of v is {:?}", bbv.bget([0, 2]).expect("Out of bounds."));
-    //~^ ERROR mismatched types
 }
diff --git a/src/test/ui/const-generics/issues/issue-83765.stderr b/src/test/ui/const-generics/issues/issue-83765.stderr
index c0e4ae66a89..3cf1aab3a8b 100644
--- a/src/test/ui/const-generics/issues/issue-83765.stderr
+++ b/src/test/ui/const-generics/issues/issue-83765.stderr
@@ -98,25 +98,7 @@ LL |         self.reference.bget(index).map(&self.closure)
    = note: expected constant `Self::DIM`
               found constant `DIM`
 
-error[E0308]: mismatched types
-  --> $DIR/issue-83765.rs:122:15
-   |
-LL |     let bbv = bv.bmap(|x| x * x);
-   |               ^^^^^^^^^^^^^^^^^^ expected `<LazyUpdim<'_, Vec<{integer}>, { Self::DIM }, 2> as TensorDimension>::DIM`, found `<LazyUpdim<'_, Vec<{integer}>, { Self::DIM }, 2> as TensorDimension>::DIM`
-   |
-   = note: expected constant `<LazyUpdim<'_, Vec<{integer}>, { Self::DIM }, 2> as TensorDimension>::DIM`
-              found constant `<LazyUpdim<'_, Vec<{integer}>, { Self::DIM }, 2> as TensorDimension>::DIM`
-
-error[E0308]: mismatched types
-  --> $DIR/issue-83765.rs:125:43
-   |
-LL |     println!("The size of v is {:?}", bbv.bget([0, 2]).expect("Out of bounds."));
-   |                                           ^^^^ expected `<LazyUpdim<'_, Vec<{integer}>, { Self::DIM }, 2> as TensorDimension>::DIM`, found `<LazyUpdim<'_, Vec<{integer}>, { Self::DIM }, 2> as TensorDimension>::DIM`
-   |
-   = note: expected constant `<LazyUpdim<'_, Vec<{integer}>, { Self::DIM }, 2> as TensorDimension>::DIM`
-              found constant `<LazyUpdim<'_, Vec<{integer}>, { Self::DIM }, 2> as TensorDimension>::DIM`
-
-error: aborting due to 12 previous errors
+error: aborting due to 10 previous errors
 
 Some errors have detailed explanations: E0277, E0308.
 For more information about an error, try `rustc --explain E0277`.