Commit Graph

25 Commits

Author SHA1 Message Date
flip1995
61bb96738c
Merge remote-tracking branch 'upstream/master' into rustup2 2021-09-02 12:38:17 +01:00
lcnr
fd8b150959 feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
Labelray
0a021d5900 Add new lints negative_feature_names and redundant_feature_names 2021-08-23 21:05:44 +08:00
flip1995
884ef4c287 Merge commit '4c41a222ca5d1325fb4b6709395bd06e766cc042' into clippyup 2021-07-19 11:52:05 +02:00
Anthony Huang
e9e10d209e Run bless 2021-07-19 01:21:06 -04:00
Anthony Huang
357a8f0344 Add redundant_method_names lint 2021-07-05 14:15:20 -04:00
flip1995
02bf692169 Merge commit '98e2b9f25b6db4b2680a3d388456d9f95cb28344' into clippyup 2021-04-22 11:31:13 +02:00
rail
26a1989041 Fix a FP in missing_const_for_fn
where a function that calls a standard library function whose constness
is unstable is considered as being able to be a const function
2021-04-14 09:23:44 +12:00
Oliver Scherer
1eb0053dcd Stabilize transmute in constants and statics but not const fn 2020-07-11 09:22:17 +02:00
Krishna Sai Veera Reddy
049079856b Prevent missing_const_for_fn on functions with const generic params
`const` functions cannot have const generic parameters so prevent the
`missing_const_for_fn` lint from firing in that case.
2020-02-21 19:56:44 -08:00
Philipp Hansch
45333102d7
Resolve FIXME: String::new is now a const fn
`const_string_new` is stable since Rust 1.39
2020-01-26 11:03:53 +01:00
Yuki Okushi
f7a93f029c Apply suggestion from code review 2020-01-07 18:38:12 +09:00
Yuki Okushi
07e33633a3 Update stderrs 2020-01-07 18:38:12 +09:00
Lzu Tao
652666b288 rustup "Add span information to ExprKind::Assign" 2019-12-24 11:25:24 +07:00
Manish Goregaokar
73646487af Add blank stderr file for cant_be_const test 2019-11-27 15:09:48 -08:00
Philipp Hansch
5e1fdf9ae6
Add missing UI test change 2019-08-29 18:37:43 +02:00
Philipp Hansch
1b18597554
Fix missing_const_for_fn false positive
We don't want to lint if any of the input parameters implement drop.

(constant functions cannot evaluate destructors)
2019-08-29 08:07:41 +02:00
flip1995
0fc8eaf294
Remove empty *.std{err,out} files 2019-08-26 10:22:34 +02:00
Philipp Hansch
15cba2e956
Fix missing_const_for_fn for impl trait methods 2019-03-05 08:11:55 +01:00
Philipp Hansch
b87f5bc55a
Don't trigger missing_const_for_fn in external macros
As reported in #3841. Only fixes the part where it triggers on the
`derive`.
2019-03-04 22:56:33 +01:00
Philipp Hansch
aed001b8d4
Update various docs
* `const_transmute` currently also seems to depend on the `const_fn`
  feature.
* Only `Sized` is currently allowed as a bound, not Copy.
2019-01-29 08:19:05 +01:00
Philipp Hansch
0c6bdda562
Use built-in entry_fn detection over self-built 2019-01-29 08:19:05 +01:00
Philipp Hansch
c0a02691d8
cargo fmt 2019-01-29 08:19:05 +01:00
Philipp Hansch
f9d65b6356
Reorganize conditionals: Run faster checks first 2019-01-29 08:19:05 +01:00
Philipp Hansch
c3980bf0bc
Add initial version of const_fn lint 2019-01-29 08:19:05 +01:00