Skip to content

Commit 8e92f4f

Browse files
committed
Remove unused cx parameter from pathvec_std and path_std.
1 parent 6ee1b62 commit 8e92f4f

File tree

12 files changed

+21
-21
lines changed

12 files changed

+21
-21
lines changed

src/librustc_builtin_macros/deriving/bounds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn expand_deriving_copy(
1616
let trait_def = TraitDef {
1717
span,
1818
attributes: Vec::new(),
19-
path: path_std!(cx, marker::Copy),
19+
path: path_std!(marker::Copy),
2020
additional_bounds: Vec::new(),
2121
generics: LifetimeBounds::empty(),
2222
is_unsafe: false,

src/librustc_builtin_macros/deriving/clone.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn expand_deriving_clone(
5656
}
5757
}
5858
ItemKind::Union(..) => {
59-
bounds = vec![Literal(path_std!(cx, marker::Copy))];
59+
bounds = vec![Literal(path_std!(marker::Copy))];
6060
is_shallow = true;
6161
substructure = combine_substructure(Box::new(|c, s, sub| {
6262
cs_clone_shallow("Clone", c, s, sub, true)
@@ -78,7 +78,7 @@ pub fn expand_deriving_clone(
7878
let trait_def = TraitDef {
7979
span,
8080
attributes: Vec::new(),
81-
path: path_std!(cx, clone::Clone),
81+
path: path_std!(clone::Clone),
8282
additional_bounds: bounds,
8383
generics: LifetimeBounds::empty(),
8484
is_unsafe: false,

src/librustc_builtin_macros/deriving/cmp/eq.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub fn expand_deriving_eq(
2222
let trait_def = TraitDef {
2323
span,
2424
attributes: Vec::new(),
25-
path: path_std!(cx, cmp::Eq),
25+
path: path_std!(cmp::Eq),
2626
additional_bounds: Vec::new(),
2727
generics: LifetimeBounds::empty(),
2828
is_unsafe: false,
@@ -47,7 +47,7 @@ pub fn expand_deriving_eq(
4747
cx,
4848
span,
4949
item,
50-
path_std!(cx, marker::StructuralEq),
50+
path_std!(marker::StructuralEq),
5151
push,
5252
);
5353

src/librustc_builtin_macros/deriving/cmp/ord.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub fn expand_deriving_ord(
2020
let trait_def = TraitDef {
2121
span,
2222
attributes: Vec::new(),
23-
path: path_std!(cx, cmp::Ord),
23+
path: path_std!(cmp::Ord),
2424
additional_bounds: Vec::new(),
2525
generics: LifetimeBounds::empty(),
2626
is_unsafe: false,
@@ -30,7 +30,7 @@ pub fn expand_deriving_ord(
3030
generics: LifetimeBounds::empty(),
3131
explicit_self: borrowed_explicit_self(),
3232
args: vec![(borrowed_self(), "other")],
33-
ret_ty: Literal(path_std!(cx, cmp::Ordering)),
33+
ret_ty: Literal(path_std!(cmp::Ordering)),
3434
attributes: attrs,
3535
is_unsafe: false,
3636
unify_fieldless_variants: true,

src/librustc_builtin_macros/deriving/cmp/partial_eq.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub fn expand_deriving_partial_eq(
8585
cx,
8686
span,
8787
item,
88-
path_std!(cx, marker::StructuralPartialEq),
88+
path_std!(marker::StructuralPartialEq),
8989
push,
9090
);
9191

@@ -100,7 +100,7 @@ pub fn expand_deriving_partial_eq(
100100
let trait_def = TraitDef {
101101
span,
102102
attributes: Vec::new(),
103-
path: path_std!(cx, cmp::PartialEq),
103+
path: path_std!(cmp::PartialEq),
104104
additional_bounds: Vec::new(),
105105
generics: LifetimeBounds::empty(),
106106
is_unsafe: false,

src/librustc_builtin_macros/deriving/cmp/partial_ord.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ pub fn expand_deriving_partial_ord(
3737
}};
3838
}
3939

40-
let ordering_ty = Literal(path_std!(cx, cmp::Ordering));
40+
let ordering_ty = Literal(path_std!(cmp::Ordering));
4141
let ret_ty = Literal(Path::new_(
42-
pathvec_std!(cx, option::Option),
42+
pathvec_std!(option::Option),
4343
None,
4444
vec![Box::new(ordering_ty)],
4545
PathKind::Std,
@@ -80,7 +80,7 @@ pub fn expand_deriving_partial_ord(
8080
let trait_def = TraitDef {
8181
span,
8282
attributes: vec![],
83-
path: path_std!(cx, cmp::PartialOrd),
83+
path: path_std!(cmp::PartialOrd),
8484
additional_bounds: vec![],
8585
generics: LifetimeBounds::empty(),
8686
is_unsafe: false,

src/librustc_builtin_macros/deriving/debug.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ pub fn expand_deriving_debug(
1818
) {
1919
// &mut ::std::fmt::Formatter
2020
let fmtr =
21-
Ptr(Box::new(Literal(path_std!(cx, fmt::Formatter))), Borrowed(None, ast::Mutability::Mut));
21+
Ptr(Box::new(Literal(path_std!(fmt::Formatter))), Borrowed(None, ast::Mutability::Mut));
2222

2323
let trait_def = TraitDef {
2424
span,
2525
attributes: Vec::new(),
26-
path: path_std!(cx, fmt::Debug),
26+
path: path_std!(fmt::Debug),
2727
additional_bounds: Vec::new(),
2828
generics: LifetimeBounds::empty(),
2929
is_unsafe: false,
@@ -33,7 +33,7 @@ pub fn expand_deriving_debug(
3333
generics: LifetimeBounds::empty(),
3434
explicit_self: borrowed_explicit_self(),
3535
args: vec![(fmtr, "f")],
36-
ret_ty: Literal(path_std!(cx, fmt::Result)),
36+
ret_ty: Literal(path_std!(fmt::Result)),
3737
attributes: Vec::new(),
3838
is_unsafe: false,
3939
unify_fieldless_variants: false,

src/librustc_builtin_macros/deriving/decodable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn expand_deriving_rustc_decodable(
4444
"d",
4545
)],
4646
ret_ty: Literal(Path::new_(
47-
pathvec_std!(cx, result::Result),
47+
pathvec_std!(result::Result),
4848
None,
4949
vec![
5050
Box::new(Self_),

src/librustc_builtin_macros/deriving/default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub fn expand_deriving_default(
2121
let trait_def = TraitDef {
2222
span,
2323
attributes: Vec::new(),
24-
path: path_std!(cx, default::Default),
24+
path: path_std!(default::Default),
2525
additional_bounds: Vec::new(),
2626
generics: LifetimeBounds::empty(),
2727
is_unsafe: false,

src/librustc_builtin_macros/deriving/encodable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ pub fn expand_deriving_rustc_encodable(
128128
"s",
129129
)],
130130
ret_ty: Literal(Path::new_(
131-
pathvec_std!(cx, result::Result),
131+
pathvec_std!(result::Result),
132132
None,
133133
vec![
134134
Box::new(Tuple(Vec::new())),

src/librustc_builtin_macros/deriving/hash.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn expand_deriving_hash(
1515
item: &Annotatable,
1616
push: &mut dyn FnMut(Annotatable),
1717
) {
18-
let path = Path::new_(pathvec_std!(cx, hash::Hash), None, vec![], PathKind::Std);
18+
let path = Path::new_(pathvec_std!(hash::Hash), None, vec![], PathKind::Std);
1919

2020
let typaram = "__H";
2121

@@ -32,7 +32,7 @@ pub fn expand_deriving_hash(
3232
name: sym::hash,
3333
generics: LifetimeBounds {
3434
lifetimes: Vec::new(),
35-
bounds: vec![(typaram, vec![path_std!(cx, hash::Hasher)])],
35+
bounds: vec![(typaram, vec![path_std!(hash::Hasher)])],
3636
},
3737
explicit_self: borrowed_explicit_self(),
3838
args: vec![(Ptr(Box::new(Literal(arg)), Borrowed(None, Mutability::Mut)), "state")],

src/librustc_builtin_macros/deriving/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ macro path_local($x:ident) {
1010
generic::ty::Path::new_local(stringify!($x))
1111
}
1212

13-
macro pathvec_std($cx:expr, $($rest:ident)::+) {{
13+
macro pathvec_std($($rest:ident)::+) {{
1414
vec![ $( stringify!($rest) ),+ ]
1515
}}
1616

0 commit comments

Comments
 (0)