diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2023-04-16 11:12:37 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2023-04-16 11:38:52 +0000 |
| commit | 4c6ddc036b13cc9fa06e437295476231a7c11435 (patch) | |
| tree | 717b3f36e2816da3d169201b14b384e30b04b077 /tests/rustdoc/hide-complex-unevaluated-const-arguments.rs | |
| parent | 147e850691b60b273643f1e4d3b53cad620b80b7 (diff) | |
| download | rust-4c6ddc036b13cc9fa06e437295476231a7c11435.tar.gz rust-4c6ddc036b13cc9fa06e437295476231a7c11435.zip | |
fix library and rustdoc tests
Diffstat (limited to 'tests/rustdoc/hide-complex-unevaluated-const-arguments.rs')
| -rw-r--r-- | tests/rustdoc/hide-complex-unevaluated-const-arguments.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/rustdoc/hide-complex-unevaluated-const-arguments.rs b/tests/rustdoc/hide-complex-unevaluated-const-arguments.rs index d368db909fa..6006354eba4 100644 --- a/tests/rustdoc/hide-complex-unevaluated-const-arguments.rs +++ b/tests/rustdoc/hide-complex-unevaluated-const-arguments.rs @@ -29,7 +29,7 @@ pub trait Stage { // // @has - '//*[@id="associatedconstant.ARRAY1"]' \ // 'const ARRAY1: [u8; { _ }]' - const ARRAY1: [u8; Struct::new(/* ... */) + Self::ABSTRACT * 1_000]; + const ARRAY1: [u8; Struct::new(/* ... */).do_something(Self::ABSTRACT * 1_000)]; // @has - '//*[@id="associatedconstant.VERBOSE"]' \ // 'const VERBOSE: [u16; { _ }]' @@ -73,10 +73,14 @@ pub struct Struct { private: () } impl Struct { const fn new() -> Self { Self { private: () } } + const fn do_something(self, x: usize) -> usize { + x + } } - +/* FIXME(const-trait): readd this impl const std::ops::Add<usize> for Struct { type Output = usize; fn add(self, _: usize) -> usize { 0 } } +*/ |
