finalchild
e331ae57df
Migrate forbidden_default and *_without_body
2022-08-22 01:11:59 +09:00
finalchild
b28cc097cf
Support #[fatal(..)]
2022-08-22 01:11:55 +09:00
finalchild
bfefefbcfa
Migrate fn_param_forbidden_self and rename others to have prefix fn_param_
2022-08-22 00:57:22 +09:00
finalchild
07e0bc9600
Rename c_var_args_without_named_arg to c_var_args_is_sole_param
2022-08-22 00:57:22 +09:00
finalchild
c6903c04b1
Migrate doc_comment_on_fn_param, forbidden_attr_on_fn_param
2022-08-22 00:57:21 +09:00
finalchild
269c85390c
Migrate forbidden_lifetime_bound, forbidden_non_lifetime_param, too_many_params, c_var_args_without_named_arg, c_var_args_not_last
2022-08-22 00:57:21 +09:00
finalchild
e3d4c4039a
Migrate trait_fn_async
2022-08-22 00:57:21 +09:00
finalchild
e144a2367a
Migrate deprecated_where_clause_location, forbidden_assoc_constraint, keyword_lifetime, invalid_label, invalid_visibility
2022-08-22 00:57:21 +09:00
finalchild
d6fdf14eb7
Migrate forbidden_let
2022-08-22 00:57:21 +09:00
Matthias Krüger
8237efc52d
Rollup merge of #100392 - nnethercote:simplify-visitors, r=cjgillot
...
Simplify visitors
By removing some unused arguments.
r? `@cjgillot`
2022-08-11 22:53:08 +02:00
Nicholas Nethercote
232bd80130
Simplify rustc_ast::visit::Visitor::visit_poly_trait_ref.
...
It is passed an argument that is never used.
2022-08-11 11:10:01 +10:00
Nicholas Nethercote
421125f30a
Simplify rustc_ast::visit::Visitor::visit_enum_def.
...
It's passed three arguments that are never used.
2022-08-11 10:54:01 +10:00
Michael Goulet
a2b6744af0
Use &mut Diagnostic instead of &mut DiagnosticBuilder unless needed
2022-08-10 03:45:42 +00:00
Deadbeef
9b75f2d498
Allow ~const on super traits
2022-07-23 14:25:55 +00:00
Caio
3266460749
Stabilize let_chains
2022-07-16 20:17:58 -03:00
Maybe Waffle
40ae7b5b8e
Parse closure binders
...
This is first step in implementing RFC 3216.
- Parse `for<'a>` before closures in ast
- Error in lowering
- Add `closure_lifetime_binder` feature
2022-07-12 16:25:16 +04:00
Nixon Enraght-Moony
02fb345964
Suggest using block for extern "abi" fn with no body
2022-07-06 13:27:53 +01:00
Nixon Enraght-Moony
18ca2946e0
ast: Add span to Extern
2022-07-02 23:30:03 +01:00
Takayuki Maeda
77d6176e69
remove unnecessary to_string and String::new
2022-06-13 15:48:40 +09:00
xFrednet
b5eee17088
Support the #[expect] attribute on fn parameters (RFC-2383)
2022-06-04 00:50:45 +02:00
Matthias Krüger
5fc8a8e227
clippy::complexity fixes
...
clone_on_copy
useless_format
bind_instead_of_map
filter_map_identity
useless_conversion
map_flatten
unnecessary_unwrap
2022-05-26 13:14:24 +02:00
Camille GILLOT
5953c57f27
Introduce LifetimeCtxt.
2022-05-20 12:25:05 +02:00
SparrowLii
38bd4fbdbd
rename to BoundKind and add comments
2022-04-21 10:09:32 +08:00
SparrowLii
4375b36117
Add BoundCtxt in visit_param_bounds to check questions in bounds
2022-04-20 19:06:32 +08:00
Camille GILLOT
e47f66dc0d
Visit generics inside visit_fn.
2022-04-17 11:03:33 +02:00
Caio
6ee3c47a3a
[let_chains] Forbid let inside parentheses
2022-03-31 18:33:05 -03:00
Dylan DPC
03b3993ae8
Rollup merge of #95461 - nyurik:spelling, r=lcnr
...
Spellchecking some comments
This PR attempts to clean up some minor spelling mistakes in comments
2022-03-30 09:10:07 +02:00
Yuri Astrakhan
a9cc3f6564
Spellchecking compiler code
...
Address some spelling mistakes in strings, private function names, and function params.
2022-03-30 01:42:10 -04:00
Yuri Astrakhan
7e8201ae0a
Spellchecking some comments
...
This PR attempts to clean up some minor spelling mistakes in comments
2022-03-30 01:39:38 -04:00
Caio
9e0b7c3f44
Minor let_chains modification
2022-03-25 18:50:52 -03:00
Michael Howell
3729b17b7e
diagnostics: do not suggest fn foo({ <body> }
...
Instead of suggesting that the body always replace the last character on the
line, presuming it must be a semicolon, the parser should instead check what
the last character is, and append the body if it is anything else.
Fixes #83104
2022-03-22 15:29:07 -07:00
mark
bb8d4307eb
rustc_error: make ErrorReported impossible to construct
...
There are a few places were we have to construct it, though, and a few
places that are more invasive to change. To do this, we create a
constructor with a long obvious name.
2022-03-16 10:35:24 -05:00
Caio
915f9a599c
Warn users about || in let chain expressions
2022-03-09 15:04:09 -03:00
Jack Huey
2b151fd5c8
Review changes
2022-03-05 13:15:00 -05:00
Jack Huey
3f504f6984
Change to lint
2022-03-05 13:15:00 -05:00
Jack Huey
c20b4f5584
Change syntax for TyAlias where clauses
2022-03-05 13:13:45 -05:00
est31
2ef8af6619
Adopt let else in more places
2022-02-19 17:27:43 +01:00
kadmin
fb57b7518d
Add term
...
Instead of having a separate enum variant for types and consts have one but have either a const
or type.
2022-01-17 17:20:57 +00:00
kadmin
0765999622
add eq constraints on associated constants
2022-01-17 17:20:57 +00:00
Tomasz Miąsko
000b36c505
Remove deprecated LLVM-style inline assembly
2022-01-12 18:51:31 +01:00
Aaron Hill
137c374c41
Move PatKind::Lit checking from ast_validation to ast lowering
...
Fixes #92074
This allows us to insert an `ExprKind::Err` when an invalid expression
is used in a literal pattern, preventing later stages of compilation
from seeing an unexpected literal pattern.
2022-01-01 15:10:43 -05:00
Nicholas Nethercote
b1c934ebb8
Remove unnecessary sigils around Ident::as_str() calls.
2021-12-15 17:32:42 +11:00
Ellen
69d2d735bc
remove feature gate and cleanup code
2021-12-10 19:20:31 +00:00
Esteban Kuber
4954389a9d
Account for incorrect where T::Assoc = Ty bound
...
Provide suggestoin to constrain trait bound for associated type.
Revert incorrect changes to `missing-bounds` test.
Address part of #20041 .
2021-11-25 01:49:48 +00:00
Vadim Petrochenkov
2834f57c45
ast: Fix naming conventions in AST structures
...
TraitKind -> Trait
TyAliasKind -> TyAlias
ImplKind -> Impl
FnKind -> Fn
All `*Kind`s in AST are supposed to be enums.
Tuple structs are converted to braced structs for the types above, and fields are reordered in syntactic order.
Also, mutable AST visitor now correctly visit spans in defaultness, unsafety, impl polarity and constness.
2021-11-07 21:38:17 +08:00
r00ster91
3c1d55422a
Some "parenthesis" and "parentheses" fixes
2021-10-17 12:04:01 +02:00
Jubilee
c9158db1f3
Rollup merge of #89494 - FabianWolff:issue-84075, r=davidtwco
...
Deny `where` clauses on `auto` traits
Fixes #84075 .
2021-10-04 21:12:43 -07:00
Fabian Wolff
e34fd54611
Deny where clauses on auto traits
2021-10-03 18:06:21 +02:00
Hirochika Matsumoto
3818981ca1
Practice diagnostic message convention
2021-10-03 16:16:28 +09:00
Manish Goregaokar
fb2d7dff80
Rollup merge of #88775 - pnkfelix:revert-anon-union-parsing, r=davidtwco
...
Revert anon union parsing
Revert PR #84571 and #85515 , which implemented anonymous union parsing in a manner that broke the context-sensitivity for the `union` keyword and thus broke stable Rust code.
Fix #88583 .
2021-09-15 14:56:58 -07:00