about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-01-22 13:40:01 +0000
committerbors <bors@rust-lang.org>2019-01-22 13:40:01 +0000
commitad30e9a6814b5d29dfbdcd85ecde48afcc94389b (patch)
tree0e358d32a69cc6c584211e87fd412d8f3cb505fb /src/libsyntax
parent76c87a166fa8ca247855ea6c32465d627d1ead14 (diff)
parentdec7b7b1315a073c40c253cc9c80fc693422e3bf (diff)
downloadrust-ad30e9a6814b5d29dfbdcd85ecde48afcc94389b.tar.gz
rust-ad30e9a6814b5d29dfbdcd85ecde48afcc94389b.zip
Auto merge of #57830 - Centril:rollup, r=Centril
Rollup of 9 pull requests

Successful merges:

 - #57537 (Small perf improvement for fmt)
 - #57552 (Default images)
 - #57604 (Make `str` indexing generic on `SliceIndex`.)
 - #57667 (Fix memory leak in P::filter_map)
 - #57677 (const_eval: Predetermine the layout of all locals when pushing a stack frame)
 - #57791 (Add regression test for #54582)
 - #57798 (Corrected spelling inconsistency)
 - #57809 (Add powerpc64-unknown-freebsd)
 - #57813 (fix validation range printing when encountering undef)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs8
-rw-r--r--src/libsyntax/fold.rs12
-rw-r--r--src/libsyntax/parse/parser.rs4
-rw-r--r--src/libsyntax/ptr.rs1
4 files changed, 13 insertions, 12 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 405cf612543..798f14dcba9 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -136,7 +136,7 @@ pub enum GenericArgs {
     /// The `<'a, A,B,C>` in `foo::bar::baz::<'a, A,B,C>`
     AngleBracketed(AngleBracketedArgs),
     /// The `(A,B)` and `C` in `Foo(A,B) -> C`
-    Parenthesized(ParenthesisedArgs),
+    Parenthesized(ParenthesizedArgs),
 }
 
 impl GenericArgs {
@@ -173,7 +173,7 @@ impl Into<Option<P<GenericArgs>>> for AngleBracketedArgs {
     }
 }
 
-impl Into<Option<P<GenericArgs>>> for ParenthesisedArgs {
+impl Into<Option<P<GenericArgs>>> for ParenthesizedArgs {
     fn into(self) -> Option<P<GenericArgs>> {
         Some(P(GenericArgs::Parenthesized(self)))
     }
@@ -181,7 +181,7 @@ impl Into<Option<P<GenericArgs>>> for ParenthesisedArgs {
 
 /// A path like `Foo(A,B) -> C`
 #[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
-pub struct ParenthesisedArgs {
+pub struct ParenthesizedArgs {
     /// Overall span
     pub span: Span,
 
@@ -192,7 +192,7 @@ pub struct ParenthesisedArgs {
     pub output: Option<P<Ty>>,
 }
 
-impl ParenthesisedArgs {
+impl ParenthesizedArgs {
     pub fn as_angle_bracketed_args(&self) -> AngleBracketedArgs {
         AngleBracketedArgs {
             span: self.span,
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs
index a4c3b38f691..fdcbbb939a6 100644
--- a/src/libsyntax/fold.rs
+++ b/src/libsyntax/fold.rs
@@ -207,8 +207,8 @@ pub trait Folder : Sized {
         noop_fold_angle_bracketed_parameter_data(p, self)
     }
 
-    fn fold_parenthesized_parameter_data(&mut self, p: ParenthesisedArgs)
-                                         -> ParenthesisedArgs
+    fn fold_parenthesized_parameter_data(&mut self, p: ParenthesizedArgs)
+                                         -> ParenthesizedArgs
     {
         noop_fold_parenthesized_parameter_data(p, self)
     }
@@ -504,12 +504,12 @@ pub fn noop_fold_angle_bracketed_parameter_data<T: Folder>(data: AngleBracketedA
     }
 }
 
-pub fn noop_fold_parenthesized_parameter_data<T: Folder>(data: ParenthesisedArgs,
+pub fn noop_fold_parenthesized_parameter_data<T: Folder>(data: ParenthesizedArgs,
                                                          fld: &mut T)
-                                                         -> ParenthesisedArgs
+                                                         -> ParenthesizedArgs
 {
-    let ParenthesisedArgs { inputs, output, span } = data;
-    ParenthesisedArgs {
+    let ParenthesizedArgs { inputs, output, span } = data;
+    ParenthesizedArgs {
         inputs: inputs.move_map(|ty| fld.fold_ty(ty)),
         output: output.map(|ty| fld.fold_ty(ty)),
         span: fld.new_span(span)
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 439eec5b0c4..09ea0995253 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1,5 +1,5 @@
 use rustc_target::spec::abi::{self, Abi};
-use ast::{AngleBracketedArgs, ParenthesisedArgs, AttrStyle, BareFnTy};
+use ast::{AngleBracketedArgs, ParenthesizedArgs, AttrStyle, BareFnTy};
 use ast::{GenericBound, TraitBoundModifier};
 use ast::Unsafety;
 use ast::{Mod, AnonConst, Arg, Arm, Guard, Attribute, BindingMode, TraitItemKind};
@@ -2203,7 +2203,7 @@ impl<'a> Parser<'a> {
                 } else {
                     None
                 };
-                ParenthesisedArgs { inputs, output, span }.into()
+                ParenthesizedArgs { inputs, output, span }.into()
             };
 
             PathSegment { ident, args, id: ast::DUMMY_NODE_ID }
diff --git a/src/libsyntax/ptr.rs b/src/libsyntax/ptr.rs
index bb1744e2df1..3effe53cd29 100644
--- a/src/libsyntax/ptr.rs
+++ b/src/libsyntax/ptr.rs
@@ -101,6 +101,7 @@ impl<T: 'static> P<T> {
                 // Recreate self from the raw pointer.
                 Some(P { ptr: Box::from_raw(p) })
             } else {
+                drop(Box::from_raw(p));
                 None
             }
         }