mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-07 09:20:07 +00:00
New upstream version 1.27.2+dfsg1
This commit is contained in:
parent
83c7162d06
commit
5d61e2aca7
11
RELEASES.md
11
RELEASES.md
@ -1,3 +1,14 @@
|
|||||||
|
Version 1.27.2 (2018-07-20)
|
||||||
|
===========================
|
||||||
|
|
||||||
|
Compatibility Notes
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
- The borrow checker was fixed to avoid potential unsoundness when using
|
||||||
|
match ergonomics: [#52213][52213].
|
||||||
|
|
||||||
|
[52213]: https://github.com/rust-lang/rust/issues/52213
|
||||||
|
|
||||||
Version 1.27.1 (2018-07-10)
|
Version 1.27.1 (2018-07-10)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
5f2b325f64ed6caa7179f3e04913db437656ec7e
|
58cc626de3301192d5d8c6dcbde43b5b44211ae2
|
@ -24,7 +24,7 @@ use Build;
|
|||||||
use config::Config;
|
use config::Config;
|
||||||
|
|
||||||
// The version number
|
// The version number
|
||||||
pub const CFG_RELEASE_NUM: &str = "1.27.1";
|
pub const CFG_RELEASE_NUM: &str = "1.27.2";
|
||||||
|
|
||||||
pub struct GitInfo {
|
pub struct GitInfo {
|
||||||
inner: Option<Info>,
|
inner: Option<Info>,
|
||||||
|
@ -1325,7 +1325,7 @@ impl<'a, 'gcx, 'tcx> MemCategorizationContext<'a, 'gcx, 'tcx> {
|
|||||||
ref ty => span_bug!(pat.span, "tuple pattern unexpected type {:?}", ty),
|
ref ty => span_bug!(pat.span, "tuple pattern unexpected type {:?}", ty),
|
||||||
};
|
};
|
||||||
for (i, subpat) in subpats.iter().enumerate_and_adjust(expected_len, ddpos) {
|
for (i, subpat) in subpats.iter().enumerate_and_adjust(expected_len, ddpos) {
|
||||||
let subpat_ty = self.pat_ty_unadjusted(&subpat)?; // see (*2)
|
let subpat_ty = self.pat_ty_adjusted(&subpat)?; // see (*2)
|
||||||
let interior = InteriorField(FieldIndex(i, Name::intern(&i.to_string())));
|
let interior = InteriorField(FieldIndex(i, Name::intern(&i.to_string())));
|
||||||
let subcmt = Rc::new(self.cat_imm_interior(pat, cmt.clone(), subpat_ty, interior));
|
let subcmt = Rc::new(self.cat_imm_interior(pat, cmt.clone(), subpat_ty, interior));
|
||||||
self.cat_pattern_(subcmt, &subpat, op)?;
|
self.cat_pattern_(subcmt, &subpat, op)?;
|
||||||
|
@ -105,7 +105,10 @@ use rustc::hir::{self, PatKind};
|
|||||||
|
|
||||||
// a variation on try that just returns unit
|
// a variation on try that just returns unit
|
||||||
macro_rules! ignore_err {
|
macro_rules! ignore_err {
|
||||||
($e:expr) => (match $e { Ok(e) => e, Err(_) => return () })
|
($e:expr) => (match $e { Ok(e) => e, Err(_) => {
|
||||||
|
debug!("ignoring mem-categorization error!");
|
||||||
|
return ()
|
||||||
|
}})
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
@ -1036,7 +1039,7 @@ impl<'a, 'gcx, 'tcx> RegionCtxt<'a, 'gcx, 'tcx> {
|
|||||||
debug!("link_pattern(discr_cmt={:?}, root_pat={:?})",
|
debug!("link_pattern(discr_cmt={:?}, root_pat={:?})",
|
||||||
discr_cmt,
|
discr_cmt,
|
||||||
root_pat);
|
root_pat);
|
||||||
let _ = self.with_mc(|mc| {
|
ignore_err!(self.with_mc(|mc| {
|
||||||
mc.cat_pattern(discr_cmt, root_pat, |sub_cmt, sub_pat| {
|
mc.cat_pattern(discr_cmt, root_pat, |sub_cmt, sub_pat| {
|
||||||
match sub_pat.node {
|
match sub_pat.node {
|
||||||
// `ref x` pattern
|
// `ref x` pattern
|
||||||
@ -1051,7 +1054,7 @@ impl<'a, 'gcx, 'tcx> RegionCtxt<'a, 'gcx, 'tcx> {
|
|||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Link lifetime of borrowed pointer resulting from autoref to lifetimes in the value being
|
/// Link lifetime of borrowed pointer resulting from autoref to lifetimes in the value being
|
||||||
|
24
src/test/compile-fail/issue-52213.rs
Normal file
24
src/test/compile-fail/issue-52213.rs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
// file at the top-level directory of this distribution and at
|
||||||
|
// http://rust-lang.org/COPYRIGHT.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
// option. This file may not be copied, modified, or distributed
|
||||||
|
// except according to those terms.
|
||||||
|
|
||||||
|
fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T {
|
||||||
|
match (&t,) { //~ ERROR cannot infer an appropriate lifetime
|
||||||
|
((u,),) => u,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let x = {
|
||||||
|
let y = Box::new((42,));
|
||||||
|
transmute_lifetime(&y)
|
||||||
|
};
|
||||||
|
|
||||||
|
println!("{}", x);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user