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

8 lines
164 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)]
If a "start" lang item incl. MIR is present, run that instead of running main directly This fixes the memory leaks when running a simple "Hello World" with MIR-libstd
2017-05-26 17:36:16 -07:00
#![miri(memory_size=20)]
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];
If a "start" lang item incl. MIR is present, run that instead of running main directly This fixes the memory leaks when running a simple "Hello World" with MIR-libstd
2017-05-26 17:36:16 -07:00
//~^ERROR tried to allocate 40 more bytes, but only
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: 246ms 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