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
7fdbde0e18b24fa75ffc8e6fc1c33d65457487f4
rust/tests/ui/invalid/invalid-path-in-const.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

5 lines
130 B
Rust
Raw Normal View History

Don't crash on non-existent path in constant. The behavior here isn't really ideal, but we can't really do much better given the current state of constant evaluation. Fixes #28670, and probably a bunch of duplicates.
2015-09-30 15:04:21 -07:00
fn main() {
fn f(a: [u8; u32::DOESNOTEXIST]) {}
rustc_const_eval: always demand typeck_tables for evaluating constants.
2017-02-15 15:00:20 +02:00
//~^ ERROR no associated item named `DOESNOTEXIST` found for type `u32`
Don't crash on non-existent path in constant. The behavior here isn't really ideal, but we can't really do much better given the current state of constant evaluation. Fixes #28670, and probably a bunch of duplicates.
2015-09-30 15:04:21 -07:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 4132ms Template: 4ms
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