1 // This test ensures that the const methods from Deref aren't shown as const.
2 // For more information, see https://github.com/rust-lang/rust/issues/90855.
6 #![feature(staged_api)]
8 #![stable(feature = "rust1", since = "1.0.0")]
10 // @has 'foo/struct.Bar.html'
11 #[stable(feature = "rust1", since = "1.0.0")]
15 // @has - '//*[@id="method.len"]' 'pub const fn len(&self) -> usize'
16 // @has - '//*[@id="method.len"]//span[@class="since"]' 'const: 1.0.0'
17 #[stable(feature = "rust1", since = "1.0.0")]
18 #[rustc_const_stable(feature = "rust1", since = "1.0.0")]
19 pub const fn len(&self) -> usize { 0 }
22 #[stable(feature = "rust1", since = "1.0.0")]
27 // @has 'foo/struct.Foo.html'
28 // @has - '//*[@id="method.len"]' 'pub fn len(&self) -> usize'
29 // @!has - '//*[@id="method.len"]//span[@class="since"]' '1.0.0'
30 // @!has - '//*[@id="method.len"]//span[@class="since"]' '(const: 1.0.0)'
31 #[stable(feature = "rust1", since = "1.0.0")]
32 impl std::ops::Deref for Foo {
35 fn deref(&self) -> &Self::Target {