]> git.lizzy.rs Git - rust.git/commitdiff
Merge branch 'master' of https://github.com/rust-lang/rust into e0389
authorgaurikholkar <f2013002@goa.bits-pilani.ac.in>
Thu, 5 Apr 2018 16:22:40 +0000 (21:52 +0530)
committergaurikholkar <f2013002@goa.bits-pilani.ac.in>
Thu, 5 Apr 2018 16:22:40 +0000 (21:52 +0530)
1  2 
src/librustc_borrowck/borrowck/mod.rs
src/librustc_mir/borrow_check/mod.rs
src/librustc_mir/lib.rs
src/librustc_mir/util/borrowck_errors.rs

Simple merge
Simple merge
index e21fa63ccc27e7d290fa8b83abab3063f6f0e472,84baa8c541781f8f21240aa2dd07071f51f51c7c..682250391b67b7007711d2753ca38cf9cf36efe9
@@@ -27,19 -27,17 +27,18 @@@ Rust MIR: a lowered representation of R
  #![feature(decl_macro)]
  #![feature(dyn_trait)]
  #![feature(fs_read_write)]
- #![feature(i128_type)]
- #![feature(inclusive_range_syntax)]
- #![feature(inclusive_range)]
+ #![cfg_attr(stage0, feature(i128_type))]
+ #![cfg_attr(stage0, feature(inclusive_range_syntax))]
  #![feature(macro_vis_matcher)]
- #![feature(match_default_bindings)]
- #![feature(never_type)]
+ #![cfg_attr(stage0, feature(match_default_bindings))]
+ #![feature(exhaustive_patterns)]
  #![feature(range_contains)]
  #![feature(rustc_diagnostic_macros)]
- #![feature(placement_in_syntax)]
- #![feature(collection_placement)]
  #![feature(nonzero)]
- #![feature(underscore_lifetimes)]
+ #![cfg_attr(stage0, feature(underscore_lifetimes))]
+ #![cfg_attr(stage0, feature(never_type))]
+ #![feature(inclusive_range_fields)]
 +#![feature(crate_visibility_modifier)]
  
  extern crate arena;
  #[macro_use]
index 5da6d135f5f2f6695157da48b70cbcca8889f4e4,5e15348de5e718a76632bf2e11c1daeceb341e4b..1078013a3e223217371fbab2d4af7eefd2767497
@@@ -284,29 -284,22 +284,33 @@@ pub trait BorrowckErrors<'cx>: Sized + 
          self.cancel_if_wrong_origin(err, o)
      }
  
++<<<<<<< HEAD
 +    fn cannot_assign(&self, span: Span, desc: &str, o: Origin, is_reference:bool)
 +                     -> DiagnosticBuilder
++=======
+     fn cannot_assign(self, span: Span, desc: &str, o: Origin) -> DiagnosticBuilder<'cx>
++>>>>>>> 56714acc5eb0687ed9a7566fdebe5528657fc5b3
      {
 +        let msg = if is_reference {
 +            "through"
 +        } else {
 +            "to"
 +        };
 +
          let err = struct_span_err!(self, span, E0594,
 -                                  "cannot assign to {}{OGN}",
 -                                  desc, OGN=o);
 +                                  "cannot assign {} {}{OGN}",
 +                                  msg, desc, OGN=o);
          self.cancel_if_wrong_origin(err, o)
      }
  
-     fn cannot_assign_static(&self, span: Span, desc: &str, o: Origin)
-                             -> DiagnosticBuilder
+     fn cannot_assign_static(self, span: Span, desc: &str, o: Origin)
+                             -> DiagnosticBuilder<'cx>
      {
 -        self.cannot_assign(span, &format!("immutable static item `{}`", desc), o)
 +        self.cannot_assign(span, &format!("immutable static item `{}`", desc), o, false)
      }
  
-     fn cannot_move_out_of(&self, move_from_span: Span, move_from_desc: &str, o: Origin)
-                           -> DiagnosticBuilder
+     fn cannot_move_out_of(self, move_from_span: Span, move_from_desc: &str, o: Origin)
+                           -> DiagnosticBuilder<'cx>
      {
          let mut err = struct_span_err!(self, move_from_span, E0507,
                                         "cannot move out of {}{OGN}",