Skip to content

Commit 67d88f6

Browse files
Remove constraints argument from path_all
It was never used
1 parent 5349e69 commit 67d88f6

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed

src/libsyntax/ext/build.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,19 @@ pub trait AstBuilder {}
1414

1515
impl<'a> ExtCtxt<'a> {
1616
pub fn path(&self, span: Span, strs: Vec<ast::Ident> ) -> ast::Path {
17-
self.path_all(span, false, strs, vec![], vec![])
17+
self.path_all(span, false, strs, vec![])
1818
}
1919
pub fn path_ident(&self, span: Span, id: ast::Ident) -> ast::Path {
2020
self.path(span, vec![id])
2121
}
2222
pub fn path_global(&self, span: Span, strs: Vec<ast::Ident> ) -> ast::Path {
23-
self.path_all(span, true, strs, vec![], vec![])
23+
self.path_all(span, true, strs, vec![])
2424
}
2525
pub fn path_all(&self,
2626
span: Span,
2727
global: bool,
2828
mut idents: Vec<ast::Ident> ,
29-
args: Vec<ast::GenericArg>,
30-
constraints: Vec<ast::AssocTyConstraint> )
29+
args: Vec<ast::GenericArg>)
3130
-> ast::Path {
3231
assert!(!idents.is_empty());
3332
let add_root = global && !idents[0].is_path_segment_keyword();
@@ -39,8 +38,8 @@ impl<'a> ExtCtxt<'a> {
3938
segments.extend(idents.into_iter().map(|ident| {
4039
ast::PathSegment::from_ident(ident.with_span_pos(span))
4140
}));
42-
let args = if !args.is_empty() || !constraints.is_empty() {
43-
ast::AngleBracketedArgs { args, constraints, span }.into()
41+
let args = if !args.is_empty() {
42+
ast::AngleBracketedArgs { args, constraints: Vec::new(), span }.into()
4443
} else {
4544
None
4645
};

src/libsyntax_ext/deriving/clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ fn cs_clone_shallow(name: &str,
115115
let span = cx.with_def_site_ctxt(span);
116116
let assert_path = cx.path_all(span, true,
117117
cx.std_path(&[sym::clone, Symbol::intern(helper_name)]),
118-
vec![GenericArg::Type(ty)], vec![]);
118+
vec![GenericArg::Type(ty)]);
119119
stmts.push(cx.stmt_let_type_only(span, cx.ty_path(assert_path)));
120120
}
121121
fn process_variant(cx: &mut ExtCtxt<'_>, stmts: &mut Vec<ast::Stmt>, variant: &VariantData) {

src/libsyntax_ext/deriving/cmp/eq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn cs_total_eq_assert(cx: &mut ExtCtxt<'_>,
5656
let span = cx.with_def_site_ctxt(span);
5757
let assert_path = cx.path_all(span, true,
5858
cx.std_path(&[sym::cmp, Symbol::intern(helper_name)]),
59-
vec![GenericArg::Type(ty)], vec![]);
59+
vec![GenericArg::Type(ty)]);
6060
stmts.push(cx.stmt_let_type_only(span, cx.ty_path(assert_path)));
6161
}
6262
fn process_variant(cx: &mut ExtCtxt<'_>,

src/libsyntax_ext/deriving/generic/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ impl<'a> TraitDef<'a> {
664664
}).collect();
665665

666666
// Create the type of `self`.
667-
let path = cx.path_all(self.span, false, vec![type_ident], self_params, vec![]);
667+
let path = cx.path_all(self.span, false, vec![type_ident], self_params);
668668
let self_type = cx.ty_path(path);
669669

670670
let attr = cx.attribute(cx.meta_word(self.span, sym::automatically_derived));

src/libsyntax_ext/deriving/generic/ty.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ impl<'a> Path<'a> {
8282
.collect();
8383

8484
match self.kind {
85-
PathKind::Global => cx.path_all(span, true, idents, params, Vec::new()),
86-
PathKind::Local => cx.path_all(span, false, idents, params, Vec::new()),
85+
PathKind::Global => cx.path_all(span, true, idents, params),
86+
PathKind::Local => cx.path_all(span, false, idents, params),
8787
PathKind::Std => {
8888
let def_site = cx.with_def_site_ctxt(DUMMY_SP);
8989
idents.insert(0, Ident::new(kw::DollarCrate, def_site));
90-
cx.path_all(span, false, idents, params, Vec::new())
90+
cx.path_all(span, false, idents, params)
9191
}
9292
}
9393

@@ -183,7 +183,7 @@ impl<'a> Ty<'a> {
183183
}
184184
}).collect();
185185

186-
cx.path_all(span, false, vec![self_ty], params, vec![])
186+
cx.path_all(span, false, vec![self_ty], params)
187187
}
188188
Literal(ref p) => p.to_path(cx, span, self_ty, generics),
189189
Ptr(..) => cx.span_bug(span, "pointer in a path in generic `derive`"),

src/libsyntax_ext/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub fn expand_option_env<'cx>(cx: &'cx mut ExtCtxt<'_>,
3232
Ident::new(sym::str, sp)),
3333
Some(lt),
3434
ast::Mutability::Immutable))],
35-
vec![]))
35+
))
3636
}
3737
Ok(s) => {
3838
cx.expr_call_global(sp,

0 commit comments

Comments
 (0)