Skip to content

Instantly share code, notes, and snippets.

// MIR for `Z`
// source = MirSource { def_id: DefId(0/0:4 ~ issue_54224[317d]::Z[0]), promoted: None }
// pass_name = nll
// disambiguator = 0
| Free Region Mapping
| '_#0r | Global | ['_#0r, '_#1r]
| '_#1r | Local | ['_#1r]
|
| Inferred Region Values
// MIR for `Z::{{constant}}`
// source = MirSource { def_id: DefId(0/1:9 ~ issue_54224[317d]::Z[0]::{{constant}}[0]), promoted: None }
// pass_name = nll
// disambiguator = 0
| Free Region Mapping
| '_#0r | Global | ['_#0r, '_#1r]
| '_#1r | Local | ['_#1r]
|
| Inferred Region Values
// NB You must compile with `--crate-type lib` to see the failure!
#![feature(nll)]
pub trait Accessor: Sized {
}
impl Accessor for () { }
pub enum AccessorCow<'a, 'b, T>
diff --git a/src/librustc_mir/borrow_check/nll/type_check/mod.rs b/src/librustc_mir/borrow_check/nll/type_check/mod.rs
index f8f23731fb..7cdd76e9b7 100644
--- a/src/librustc_mir/borrow_check/nll/type_check/mod.rs
+++ b/src/librustc_mir/borrow_check/nll/type_check/mod.rs
@@ -258,6 +258,12 @@ impl<'a, 'b, 'gcx, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'gcx, 'tcx> {
self.sanitize_type(constant, constant.ty);
}
+ fn visit_statement(&mut self, bb: BasicBlock, statement: &Statement<'tcx>, location: Location) {
+ let s = ::std::mem::replace(&mut self.last_span, statement.source_info.span);
#[derive(Clone,Copy,Eq,PartialEq,Debug)]
pub enum Trilean {
False, Maybe, True
}
pub static UCD_CASE_FD_NFKC: &'static [((u8,u8,u8),&'static [(u8,u8,u8)])] = &[
((0,0,65), &[(0,0,97)]), ((0,0,66), &[(0,0,98)]), ((0,0,67), &[(0,0,99)]),
((0,0,68), &[(0,0,100)]), ((0,0,69), &[(0,0,101)]), ((0,0,70), &[(0,0,102)]),
((0,0,71), &[(0,0,103)]), ((0,0,72), &[(0,0,104)]), ((0,0,73), &[(0,0,105)]),
((0,0,74), &[(0,0,106)]), ((0,0,75), &[(0,0,107)]), ((0,0,76), &[(0,0,108)]),
  • liballoc
  • liballoc_jemalloc
  • liballoc_system
  • libarena
  • libbacktrace
  • libcompiler_builtins
  • libcore
  • libfmt_macros
  • libgraphviz
  • liblibc
diff --git a/src/lib.rs b/src/lib.rs
index 729185a..640234b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -197,23 +197,23 @@ macro_rules! wrap_function (
};
);
-pub mod python;
-mod err;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
modified src/test/ui/generator/borrowing.nll.stderr
@@ -2,15 +2,10 @@ error[E0597]: `a` does not live long enough
--> $DIR/borrowing.rs:18:18
|
LL | unsafe { (|| yield &a).resume() }
- | ^^^^^^^^^^^^^
- | |
- | borrowed value does not live long enough
- | borrow may end up in a temporary, created here
+ | ^^^^^^^^^^^^^ borrowed value does not live long enough