Commit Graph

115 Commits

Author SHA1 Message Date
Alex Crichton
058202e523 rustc: Remove the used_unsafe field on TyCtxt
Now that lint levels are available for the entire compilation, this can be an
entirely local lint in `effect.rs`
2017-08-30 16:09:02 -07:00
Tamir Duberstein
b3f50caee0
*: remove crate_{name,type} attributes
Fixes #41701.
2017-08-25 16:18:21 -04:00
Vadim Petrochenkov
de4dbe5789 rustc: Remove some dead code 2017-08-19 13:27:16 +03:00
Guillaume Gomez
1cebf98e4c Make a lint instead 2017-07-27 20:38:33 +02:00
Vadim Petrochenkov
7ca378b251 Prohibit lifetime arguments in path segments with late bound lifetime parameters 2017-07-18 00:12:48 +03:00
Vadim Petrochenkov
bdffb9722d Move public reexports of private extern crates into a separate lint
This is going to be a hard error while all private-in-public errors from rustc_privacy will be reclassified into lints.
2017-07-08 01:56:27 +03:00
Alex Crichton
be7ebdd512 Bump version and stage0 compiler 2017-06-19 22:25:05 -07:00
Vadim Petrochenkov
26d5c0e20c Turn invalid_type_param_default into a lint again 2017-05-30 22:00:30 +03:00
Vadim Petrochenkov
caecb76f08 Turn sufficiently old compatibility lints into hard errors 2017-05-30 22:00:30 +03:00
bors
03bed65514 Auto merge of #41856 - qnighy:prohibit-parenthesized-params-in-more-types, r=arielb1
Prohibit parenthesized params in more types.

Prohibit parenthesized parameters in primitive types, type parameters, `Self`, etc.

Fixes #32995.
2017-05-29 11:32:14 +00:00
Masaki Hara
99993780dc
Add warning cycle #42238. 2017-05-26 22:21:46 +09:00
est31
df188b8f97 Add lint for unused macros 2017-05-13 16:02:29 +02:00
Alex Crichton
ab54f4b226 rustc: Remove #![unstable] annotation
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2017-05-11 16:03:05 -07:00
est31
de7dda7bf4 Add illegal_floating_point_literal_pattern compat lint
Adds a compatibility lint to disallow floating point literals in
patterns like in match.

See the tracking issue #41620.
2017-05-02 19:59:22 +02:00
est31
6cc765dcad Add a lint to disallow anonymous parameters 2017-05-02 05:15:26 +02:00
topecongiro
11ce5b72a2 Make overlapping_inherent_impls lint a hard error 2017-03-29 13:27:00 +09:00
Jeffrey Seyfried
68c1cc68b4 Refactor Attribute to use Path and TokenStream instead of MetaItem. 2017-03-14 04:03:43 +00:00
bors
691eba1358 Auto merge of #34198 - eddyb:you're-a-bad-transmute-and-you-should-feel-bad, r=nikomatsakis
Make transmuting from fn item types to pointer-sized types a hard error.

Closes #19925 by removing the future compatibility lint and the associated workarounds.
This is a `[breaking-change]` if you `transmute` from a function item without casting first.
For more information on how to fix your code, see https://github.com/rust-lang/rust/issues/19925.
2017-03-01 10:03:44 +00:00
Jeffrey Seyfried
61a9a14d29 Add warning cycle. 2017-02-28 22:15:12 +00:00
Eduard Burtescu
7650afc1ce Make transmuting from fn item types to pointer-sized types a hard error. 2017-02-28 23:47:55 +02:00
Corey Farwell
4f8ce9efb9 Rollup merge of #39009 - canndrew:default-unit-warnings, r=nikomatsakis
Add warning for () to ! switch

With feature(never_type) enabled diverging type variables will default to `!` instead of `()`. This can cause breakages where a trait is resolved on such a type.

This PR emits a future-compatibility warning when it sees this happen.
2017-02-05 09:14:39 -05:00
Alex Crichton
626e754473 Bump version, upgrade bootstrap
This commit updates the version number to 1.17.0 as we're not on that version of
the nightly compiler, and at the same time this updates src/stage0.txt to
bootstrap from freshly minted beta compiler and beta Cargo.
2017-02-03 13:25:46 -08:00
Andrew Cann
5c90dd7978 Use a proper future-compatibility lint 2017-02-03 18:48:15 +08:00
Vadim Petrochenkov
8b060e25ba Implement compatibility lint for legacy constructor visibilities 2017-01-29 02:57:14 +03:00
Jeffrey Seyfried
356fa2c5db Warn on unused #[macro_use] imports. 2017-01-22 01:31:00 +00:00
bors
7ac9d337dc Auto merge of #38679 - alexcrichton:always-deny-warnings, r=nrc
Remove not(stage0) from deny(warnings)

Historically this was done to accommodate bugs in lints, but there hasn't been a
bug in a lint since this feature was added which the warnings affected. Let's
completely purge warnings from all our stages by denying warnings in all stages.
This will also assist in tracking down `stage0` code to be removed whenever
we're updating the bootstrap compiler.
2017-01-08 08:22:06 +00:00
Andrew Cann
bcdbe942e1 Make is_useful handle empty types properly 2017-01-03 15:31:46 +08:00
Simonas Kazlauskas
b0e55a83a8 Such large. Very 128. Much bits.
This commit introduces 128-bit integers. Stage 2 builds and produces a working compiler which
understands and supports 128-bit integers throughout.

The general strategy used is to have rustc_i128 module which provides aliases for iu128, equal to
iu64 in stage9 and iu128 later. Since nowhere in rustc we rely on large numbers being supported,
this strategy is good enough to get past the first bootstrap stages to end up with a fully working
128-bit capable compiler.

In order for this strategy to work, number of locations had to be changed to use associated
max_value/min_value instead of MAX/MIN constants as well as the min_value (or was it max_value?)
had to be changed to use xor instead of shift so both 64-bit and 128-bit based consteval works
(former not necessarily producing the right results in stage1).

This commit includes manual merge conflict resolution changes from a rebase by @est31.
2016-12-30 15:15:44 +01:00
Alex Crichton
9b0b5b45db Remove not(stage0) from deny(warnings)
Historically this was done to accommodate bugs in lints, but there hasn't been a
bug in a lint since this feature was added which the warnings affected. Let's
completely purge warnings from all our stages by denying warnings in all stages.
This will also assist in tracking down `stage0` code to be removed whenever
we're updating the bootstrap compiler.
2016-12-29 21:07:20 -08:00
Jeffrey Seyfried
cfabce2230 Demote most backwards incompatible ambiguity errors from RFC 1560 to warnings. 2016-12-15 06:02:49 +00:00
Alex Crichton
2186660b51 Update the bootstrap compiler
Now that we've got a beta build, let's use it!
2016-11-30 10:38:08 -08:00
Eduard Burtescu
9aaf26e7aa rustc: rework stability to be on-demand for type-directed lookup. 2016-11-28 04:18:11 +02:00
Eduard-Mihai Burtescu
bc096549e8 rustc: desugar use a::{b,c}; into use a::b; use a::c; in HIR. 2016-11-28 04:18:10 +02:00
Jeffrey Seyfried
fa8c53bae4 Start warning cycle. 2016-11-22 01:52:04 +00:00
bors
38a959a543 Auto merge of #36843 - petrochenkov:dotstab, r=nikomatsakis
Stabilize `..` in tuple (struct) patterns

I'd like to nominate `..` in tuple and tuple struct patterns for stabilization.
This feature is a relatively small extension to existing stable functionality and doesn't have known blockers.
The feature first appeared in Rust 1.10 6 months ago.
An example of use: https://github.com/rust-lang/rust/pull/36203

Closes https://github.com/rust-lang/rust/issues/33627
r? @nikomatsakis
2016-11-08 02:06:45 -08:00
Vadim Petrochenkov
74bb594563 Stabilize .. in tuple (struct) patterns 2016-11-03 01:38:15 +03:00
Niko Matsakis
b6597528bd update extra_requirement_in_impl to #37166 2016-11-01 14:08:56 -04:00
Niko Matsakis
ddabd509a8 compare-method lint 2016-11-01 14:08:56 -04:00
bors
75a87c54d0 Auto merge of #37378 - petrochenkov:nopat, r=eddyb
Prohibit patterns in trait methods without bodies

They are not properly type checked
```rust
trait Tr {
    fn f(&a: u8); // <- This compiles
}
```
, mostly rejected by the parser already and generally don't make much sense.
This PR is kind of a missing part of https://github.com/rust-lang/rust/pull/35015.

Given the [statistics from crater](https://github.com/rust-lang/rust/pull/37378#issuecomment-256154994), the effect of this PR is mostly equivalent to improving `unused_mut` lint.

cc https://github.com/rust-lang/rust/issues/35078#issuecomment-255707355 https://github.com/rust-lang/rust/pull/35015 https://github.com/rust-lang/rfcs/pull/1685 https://github.com/rust-lang/rust/issues/35203
r? @eddyb
2016-10-29 05:41:05 -07:00
bors
a0e31a5bfc Auto merge of #36894 - petrochenkov:deny, r=nikomatsakis
Make sufficiently old or low-impact compatibility lints deny-by-default

Tracking issues are updated/created when necessary.
Needs crater run before proceeding.

r? @nikomatsakis
2016-10-27 04:06:31 -07:00
Vadim Petrochenkov
2a85211040 Make sufficiently old or low-impact compatibility lints deny-by-default 2016-10-27 12:06:03 +03:00
Nick Cameron
8c4a39cd95 review changes 2016-10-27 14:44:05 +13:00
Nick Cameron
121e903f17 Add possibility of deprecating attributes 2016-10-27 11:44:42 +13:00
Vadim Petrochenkov
811a2b91de Prohibit patterns in trait methods without bodies 2016-10-26 20:55:16 +03:00
Alex Crichton
4e65489e77 Rollup merge of #37049 - srinivasreddy:librustc_lint, r=nrc
run rustfmt on librustc_lint folder
2016-10-12 14:07:55 -07:00
Srinivas Reddy Thatiparthy
bf5dfacdde
run rustfmt on librustc_lint folder 2016-10-09 09:38:07 +05:30
Vadim Petrochenkov
b3cb8f68cc Turn compatibility lint match_of_unit_variant_via_paren_dotdot into a hard error 2016-10-05 12:22:26 +03:00
Vadim Petrochenkov
aadbcffb7c Issue deprecation warnings for safe accesses to extern statics 2016-09-09 01:07:01 +03:00
Vadim Petrochenkov
6f7e51e49b Replace _, _, _ with .. 2016-09-04 12:27:01 +03:00
Vadim Petrochenkov
bea0b15935 Implement drop translation and add lint for unions with drop fields
Fix some typeck bugs blocking drop tests
2016-09-03 13:39:34 +03:00