@@ -84,7 +84,7 @@ pub enum PathStyle {
84
84
Expr ,
85
85
/// In other contexts, notably in types, no ambiguity exists and paths can be written
86
86
/// without the disambiguator, e.g. `x<y>` - unambiguously a path.
87
- /// Paths with disambiguators are rejected for now, but may be allowed in the future .
87
+ /// Paths with disambiguators are still accepted, `x::<Y>` - unambiguously a path too .
88
88
Type ,
89
89
/// A path with generic arguments disallowed, e.g. `foo::bar::Baz`, used in imports,
90
90
/// visibilities or attributes.
@@ -1835,18 +1835,7 @@ impl<'a> Parser<'a> {
1835
1835
&& self . look_ahead ( 1 , |t| is_args_start ( t) ) {
1836
1836
// Generic arguments are found - `<`, `(`, `::<` or `::(`.
1837
1837
let lo = self . span ;
1838
- if self . eat ( & token:: ModSep ) {
1839
- // These errors are not strictly necessary and may be removed in the future.
1840
- if style == PathStyle :: Type {
1841
- let mut err = self . diagnostic ( ) . struct_span_err ( self . prev_span ,
1842
- "unnecessary path disambiguator" ) ;
1843
- err. span_label ( self . prev_span , "try removing `::`" ) ;
1844
- err. emit ( ) ;
1845
- } else if self . token == token:: OpenDelim ( token:: Paren ) {
1846
- self . diagnostic ( ) . span_err ( self . prev_span ,
1847
- "`::` is not supported before parenthesized generic arguments" )
1848
- }
1849
- }
1838
+ self . eat ( & token:: ModSep ) ;
1850
1839
1851
1840
let parameters = if self . eat_lt ( ) {
1852
1841
// `<'a, T, A = U>`
0 commit comments