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
1752af689f57667173f844eafda93bfa86c98ba4
rust/tests/compile-fail/oom.rs

8 lines
201 B
Rust
Raw Normal View History

rustc now can use integer literals in attributes
2016-09-07 10:27:57 +02:00
#![feature(custom_attribute, attr_literals)]
#![miri(memory_size=0)]
test the memory limit
2016-07-05 13:04:53 +02:00
change the block and stmt position after a function call returns previously we moved to the target block *before* calling a function, so when inspecting the stack, it appeared as if we were in the first statement of the next block.
2016-07-06 17:55:05 +02:00
fn main() {
Do not pre-allocate local variables. Thanks to the `Value` locals refactoring, now primitive locals (ints, floats, chars, bools, and the like) will not require `Allocation`s at all, and locals that are never initialized at all because of conditional control flow won't be wasting memory.
2016-10-15 23:31:42 -06:00
let _x = [42; 10];
//~^ERROR tried to allocate 40 more bytes, but only 0 bytes are free of the 0 byte memory
test the memory limit
2016-07-05 13:04:53 +02:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 127ms 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