diff options
| author | bors <bors@rust-lang.org> | 2017-11-01 18:14:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-11-01 18:14:13 +0000 |
| commit | 2be4cc040211a85b17f21e813ff62351ae4de642 (patch) | |
| tree | 00ff995722d49a7636784ddf73efea763ac349b4 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | a3f990dc08437ecf63f5e15e8ec6acb9cbedbc14 (diff) | |
| parent | aae3e74e70e3b21d00142ca9175e9d806d09a2bf (diff) | |
| download | rust-2be4cc040211a85b17f21e813ff62351ae4de642.tar.gz rust-2be4cc040211a85b17f21e813ff62351ae4de642.zip | |
Auto merge of #45538 - nikomatsakis:nll-liveness, r=pnkfelix
enable non-lexical lifetimes in the MIR borrow checker
This PR, joint work with @spastorino, fills out the NLL infrastructure and integrates it with the borrow checker. **Don't get too excited:** it includes still a number of hacks (the subtyping code is particularly hacky). However, it *does* kinda' work. =)
The final commit demonstrates this by including a test that -- with both the AST borrowck and MIR borrowck -- reports an error by default. But if you pass `-Znll`, you only get an error from the AST borrowck, demonstrating that the integration succeeds:
```
struct MyStruct {
field: String
}
fn main() {
let mut my_struct = MyStruct { field: format!("Hello") };
let value = &my_struct.field;
if value.is_empty() {
my_struct.field.push_str("Hello, world!");
//~^ ERROR cannot borrow (Ast)
}
}
```
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
