Michael Woerister
94e655eca6
Add -Zhir-stats for collecting statistics on HIR and AST
2016-11-04 11:37:39 -04:00
Vadim Petrochenkov
74bb594563
Stabilize ..
in tuple (struct) patterns
2016-11-03 01:38:15 +03:00
Eduard Burtescu
0d7201ef46
rustc: record the target type of every adjustment.
2016-11-02 04:00:02 +02:00
Eduard Burtescu
6a8d131e5d
rustc: make all read access to tcx.tables go through a method.
2016-11-02 03:50:32 +02: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
Vadim Petrochenkov
a9f91b1b0e
Preparations and cleanup
...
Diagnostics for struct path resolution errors in resolve and typeck are unified.
Self type is treated as a type alias in few places (not reachable yet).
Unsafe cell is seen in constants even through type aliases.
All checks for struct paths in typeck work on type level.
2016-10-27 22:14:41 +03:00
Vadim Petrochenkov
811a2b91de
Prohibit patterns in trait methods without bodies
2016-10-26 20:55:16 +03:00
Vadim Petrochenkov
bd291ce21a
Turn some impossible definitions into ICEs
2016-10-04 22:25:25 +03:00
Vadim Petrochenkov
64bdf1b74b
Set NON_ZERO_SIZED
flag correctly for struct/union ctors
...
And for methods/functions as well, they are zero-sized now
2016-10-04 22:20:38 +03:00
Vadim Petrochenkov
da7b1c984c
Separate Def::StructCtor/Def::VariantCtor from Def::Struct/Def::Variant
2016-10-04 22:20:37 +03:00
Jonas Schievink
cf0b7bdd0c
Call arrays "arrays" instead of "vecs" internally
2016-09-28 22:30:30 +02:00
bors
ea65ab6c7e
Auto merge of #36761 - jonathandturner:E0425_E0446_E0449, r=nrc
...
Update E0425, E0446, E0449
This addresses https://github.com/rust-lang/rust/issues/35343 , https://github.com/rust-lang/rust/issues/35923 , and https://github.com/rust-lang/rust/issues/35924 . Part of https://github.com/rust-lang/rust/issues/35233
Specifically, this adds labels to these error messages following the suggestions in the attached bugs.
r? @nrc
2016-09-27 07:30:34 -07:00
Jonathan Turner
2fa91b23c5
Update E0425, E0446, E0449
2016-09-26 16:05:46 -07:00
Tim Neumann
b0dba7439d
make emit_feature_err take a ParseSess
2016-09-26 07:07:41 +02:00
Eduard Burtescu
ef4352fba6
rustc_metadata: group information into less tags.
2016-09-20 20:08:04 +03:00
Vadim Petrochenkov
f2b672d556
Refactor TyStruct
/TyEnum
/TyUnion
into TyAdt
2016-09-08 22:17:53 +03:00
Vadim Petrochenkov
e05e74ac83
Replace _, _
with ..
2016-09-04 12:30:33 +03:00
Vadim Petrochenkov
6f7e51e49b
Replace _, _, _
with ..
2016-09-04 12:27:01 +03:00
Vadim Petrochenkov
641d8e9e4c
Some better support for unions through the compiler
2016-09-03 13:39:34 +03:00
Vadim Petrochenkov
1db878fd38
Add unions to AST
2016-09-03 13:37:25 +03:00
Jonathan Turner
6631d8e9c6
Rollup merge of #36147 - mikhail-m1:master, r=jonathandturner
...
update E0265 to new format
Fixes #35309 as part of #35233 .
I've describe partially bonus achieve in #35309
r? @jonathandturner
2016-08-31 06:29:11 -07:00
Mikhail Modin
507fe14637
update E0265 to new format
2016-08-30 22:46:52 +03:00
Keith Yeung
aa5c4bb05d
Change Constness to Spanned<Constness>
2016-08-27 22:43:51 -07:00
Keith Yeung
1e9e798cce
Move E0379 check from typeck to ast validation
2016-08-27 22:43:51 -07:00
Eduard Burtescu
dffd238f8b
rustc: pass ty::Region behind an interned 'tcx reference.
2016-08-27 01:15:06 +03:00
Jonathan Turner
d3f55e1e86
Rollup merge of #35415 - silenuss:e0030-formatting, r=jonathandturner
...
Update compiler error 0030 to use new error format.
Part of #35233 ,
Addresses #35204
r? @jonathandturner
2016-08-17 06:25:23 -07:00
bors
1de5b7e8c2
Auto merge of #35617 - jseyfried:fix_unused_cfg_attr_path, r=eddyb
...
Fix incorrect unused import warnings on `cfg_attr`ed `path` attributes
Fixes #35584 .
r? @eddyb
2016-08-16 06:32:20 -07:00
bors
e25542cb02
Auto merge of #35162 - canndrew:bang_type_coerced, r=nikomatsakis
...
Implement the `!` type
This implements the never type (`!`) and hides it behind the feature gate `#[feature(never_type)]`. With the feature gate off, things should build as normal (although some error messages may be different). With the gate on, `!` is usable as a type and diverging type variables (ie. types that are unconstrained by anything in the code) will default to `!` instead of `()`.
2016-08-16 00:12:12 -07:00
silenuss
fa61f82bf2
Update compiler error 0030 to use new error format.
2016-08-15 00:21:13 -06:00
Eduard-Mihai Burtescu
b65ff08d46
Rollup merge of #35586 - shyaamsundhar:SqushCom, r=jonathandturner
...
E0248, E0267 & E0268 Change into issue format
r? @jonathandturner Part of #35391 , #35519 and #35520 . I have squashed all changes into a single commit. Please review the changes.
E0248 Change in issue format
E0267 UT New Format
E0268 UT New Format
E0267 & E0268 New Error Format
2016-08-14 20:29:49 +03:00
Jeffrey Seyfried
b08043ee69
Allow attributes to be marked used before cfg
proccessing.
2016-08-13 20:08:42 +00:00
Andrew Cann
fadabe08f5
Rename empty/bang to never
...
Split Ty::is_empty method into is_never and is_uninhabited
2016-08-13 21:37:09 +08:00
Andrew Cann
0d863616e0
Add EmptyToAny adjustment
2016-08-13 21:37:09 +08:00
Vadim Petrochenkov
59be332a1b
Remove restrictions from tuple structs/variants
...
Hard errors are turned into feature gates
2016-08-13 00:08:14 +03:00
Eduard Burtescu
d1d16c94c5
rustc: rename ProjectionMode and its variant to be more memorable.
2016-08-12 06:43:34 +03:00
trixnz
f656a92cbb
Update error format for E0130
2016-08-10 19:55:54 +02:00
ShyamSundarB
1a6fac7ed2
E0248 Change in issue format
...
E0248 Change in issue format
E0267 UT New Format
E0268 UT New Format
E0267 & E0268 New Error Format
2016-08-10 01:15:45 +05:30
Eduard-Mihai Burtescu
c846c30584
Rollup merge of #35363 - GuillaumeGomez:err_codes, r=jonathandturner
...
Err codes
r? @jonathandturner
2016-08-06 15:01:21 +03:00
Guillaume Gomez
7cd1779c31
Add new error code tests
2016-08-05 13:17:39 +02:00
Srinivas Reddy Thatiparthy
a6c9404c29
run rustfmt on librustc_passes folder
2016-08-04 23:08:13 +05:30
Vadim Petrochenkov
5c88efc0da
Properly enforce the "patterns aren't allowed in foreign functions" check
...
Apply the same check to function pointer types
2016-08-03 01:29:53 +03:00
Vadim Petrochenkov
e5cc046659
Move the E0130 check to AST validation pass
2016-08-03 00:44:10 +03:00
Michael Woerister
415fde498a
intravisit: Fold functionality of IdVisitor into the regular Visitor.
2016-07-29 04:55:31 -04:00
Ariel Ben-Yehuda
37c569627c
refactor constant evaluation error reporting
...
Refactor constant evaluation to use a single error reporting function
that reports a type-error-like message.
Also, unify all error codes with the "constant evaluation error" message
to just E0080, and similarly for a few other duplicate codes. The old
situation was a total mess, and now that we have *something* we can
further iterate on the UX.
2016-07-22 14:32:56 +03:00
Jeffrey Seyfried
8748cd92d0
Rollup merge of #34316 - jseyfried:refactor_ast_stmt, r=eddyb
...
Refactor away `ast::Decl`, refactor `ast::Stmt`, and rename `ast::ExprKind::Again` to `ast::ExprKind::Continue`.
2016-06-26 02:17:27 +00:00
Jeffrey Seyfried
33ea1e330c
Rollup merge of #33943 - jseyfried:libsyntax_cleanup, r=nrc
...
Miscellaneous low priority cleanup in `libsyntax`.
2016-06-26 02:15:04 +00:00
Jonathan Turner
6ae3502134
Move errors from libsyntax to its own crate
2016-06-23 08:07:35 -04:00
Jeffrey Seyfried
f0b21c2d1e
Rename ast::ExprKind::Again
-> ast::ExprKind::Continue
2016-06-17 05:21:25 +00:00
Jeffrey Seyfried
0644aba0b3
Remove the type parameter from syntax::visit::Visitor
2016-06-14 07:40:32 +00:00
Vadim Petrochenkov
6d7b35bd98
Address review comments + fix rebase
2016-06-10 01:06:37 +03:00