Commit graph

17 commits

Author SHA1 Message Date
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