Commit Graph

109 Commits

Author SHA1 Message Date
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
Ariel Ben-Yehuda
7b92d05804 turn the RFC1592 warnings into hard errors
The warnings have already reached stable

The test rfc1592_deprecated is covered by `bad_sized` and
`unsized6`.

Fixes #33242
Fixes #33243
2016-09-01 13:34:56 +03:00
Eduard Burtescu
119508cdb4 Remove drop flags from structs and enums implementing Drop. 2016-08-24 13:23:37 +03:00
Vadim Petrochenkov
737961b6c6 Make private_in_public compatibility lint deny-by-default 2016-08-11 23:19:04 +03:00
Tim Neumann
75e2624a51 track current_item in Deprecated lint pass 2016-08-04 21:59:35 +02:00
Jonas Schievink
f5d29a3b59 Move variant_size_differences out of trans
Also enhances the error message a bit, fixes #30505 on the way, and adds
a test (which was missing).

Closes #34018
2016-07-10 22:12:31 +02:00
Jeffrey Seyfried
d3ae56d755 Rollup merge of #34403 - jonathandturner:move_liberror, r=alexcrichton
This PR refactors the 'errors' part of libsyntax into its own crate (librustc_errors).  This is the first part of a few refactorings to simplify error reporting and potentially support more output formats (like a standardized JSON output and possibly an --explain mode that can work with the user's code), though this PR stands on its own and doesn't assume further changes.

As part of separating out the errors crate, I have also refactored the code position portion of codemap into its own crate (libsyntax_pos).  While it's helpful to have the common code positions in a separate crate for the new errors crate, this may also enable further simplifications in the future.
2016-06-25 22:35:09 +00:00