Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
51b51b51d7931da85280382a81c4dd80c73ca754
rust/tests/ui/issues/issue-44239.rs

12 lines
218 B
Rust
Raw Normal View History

[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
2024-02-16 20:02:50 +00:00
//@ run-rustfix
Use correct span for structured suggestion On structured suggestion for `let` -> `const` and `const` -> `let`, use a proper `Span` and update tests to check the correct application. Follow up to #80012.
2021-01-07 16:44:08 -08:00
#![allow(dead_code, non_upper_case_globals)]
Cleanly error for non-const expression in associated const
2017-10-19 19:48:57 +01:00
fn main() {
Use correct span for structured suggestion On structured suggestion for `let` -> `const` and `const` -> `let`, use a proper `Span` and update tests to check the correct application. Follow up to #80012.
2021-01-07 16:44:08 -08:00
let n: usize = 0;
Cleanly error for non-const expression in associated const
2017-10-19 19:48:57 +01:00
struct Foo;
impl Foo {
const N: usize = n;
//~^ ERROR attempt to use a non-constant value
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 4816ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API