Commit Graph

100479 Commits

Author SHA1 Message Date
Guillaume Gomez
96efaad342 update ui tests 2019-10-07 17:12:54 +02:00
Guillaume Gomez
28b0e1db50 Add long error explanation for E0495 2019-10-07 17:12:54 +02:00
Adam Perry
cca58d1321 Fix syntax typo in error message. 2019-10-07 08:05:33 -07:00
Adam Perry
c49966bb1b Clarify variable names when checking track_caller methods. 2019-10-07 08:05:33 -07:00
Adam Perry
190212c6bf Prohibit #[track_caller] within trait impls as well as decls. 2019-10-07 08:05:33 -07:00
Adam Perry
f70ed29fbd Update expected error output. 2019-10-07 08:05:33 -07:00
Adam Perry
130be6d4b8 Expand E0738 to cover different cases. 2019-10-07 08:05:33 -07:00
Adam Perry
bdc4bd142b E073[6-8] include failing code examples. 2019-10-07 08:05:33 -07:00
Adam Perry
8992c30db4 E0735 -> E0739
Prevents number collision with another approved PR.
2019-10-07 08:05:33 -07:00
Adam Perry
53096c575d track_caller tests account for incomplete feature warning. 2019-10-07 08:05:33 -07:00
Adam Perry
9900211ea0 track_caller error numbers and text. 2019-10-07 08:05:33 -07:00
Adam Perry
d931afe470 Mark #![feature(track_caller)] as incomplete. 2019-10-07 08:05:32 -07:00
Adam Perry
43d4b70417 track_caller feature gate starts in 1.40.0.
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-10-07 08:05:22 -07:00
Adam Perry
6c04c8eb8e track_caller run-pass test, lint cleanup, PR review. 2019-10-07 08:05:22 -07:00
Ayose
543449d4fd [RFC 2091] Add #[track_caller] attribute.
- The attribute is behind a feature gate.
- Error if both #[naked] and #[track_caller] are applied to the same function.
- Error if #[track_caller] is applied to a non-function item.
- Error if ABI is not "rust"
- Error if #[track_caller] is applied to a trait function.

Error codes and descriptions are pending.
2019-10-07 08:05:21 -07:00
Niko Matsakis
08c0e841a7 add debug! to evaluate_obligation 2019-10-07 11:00:09 -04:00
Niko Matsakis
1dba4b0117 fix ICE from debug output by using kind_ty in dumping closure
Also, make `-Zverbose` dump all info about constants.
2019-10-07 10:59:46 -04:00
Niko Matsakis
bec0902535 avoid ICE when extracting closure-kind-ty from a canonicalized value
In such a case, the `Infer` is converted to a `Bound`
2019-10-07 10:59:13 -04:00
Niko Matsakis
0b58d9d124 correct bug in the "has escaping regions" visitor
Existing code could overlook types/substitutions that are
embedded in (e.g.) an unevaluated constant.
2019-10-07 10:58:37 -04:00
Niko Matsakis
25d04f83e3 make type-flags exhaustive
Didn't find any bugs here, but you really don't want these to fall out
of sync.
2019-10-07 10:57:44 -04:00
bors
59a31c8c67 Auto merge of #64780 - choller:master, r=michaelwoerister
Only add sanitizer runtimes when linking an executable (#64629).

This change modifies the code to only add sanitizer runtimes if we are linking an executable, as those runtimes should never be part of libraries. I successfully compiled `mozilla-central` with ASan using this patch.
2019-10-07 13:23:00 +00:00
bors
e3cb9ea15a Auto merge of #65178 - Centril:rollup-ep1zztj, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #63948 (Add feature gate for raw_dylib.)
 - #65137 (remove event that causes panics in measureme tools)
 - #65164 (Add long error explanation for E0566)
 - #65173 (Update reference)

Failed merges:

r? @ghost
2019-10-07 09:21:30 +00:00
Guillaume Gomez
8dd00088c1 Update ui tests 2019-10-07 11:20:10 +02:00
Guillaume Gomez
4bf7eea897 Add long error explanation for E0561 2019-10-07 11:20:10 +02:00
Guillaume Gomez
7a8415894f Fix/improve some error codes long explanation 2019-10-07 11:15:45 +02:00
Guillaume Gomez
2a624c2039 Add new test to heck if all error codes have tests 2019-10-07 11:15:45 +02:00
Mazdak Farrokhzad
68a4cfc242
Rollup merge of #65173 - tmandry:reffy-ref, r=tmandry
Update reference

- Add macros in extern blocks and new proc-macro support.
- Update for "modern" `meta` matcher.
- Update await desugaring after rust-lang/rust#64292
2019-10-07 10:36:49 +02:00
Mazdak Farrokhzad
4db77a4c58
Rollup merge of #65164 - GuillaumeGomez:long-err-explanation-E0566, r=estebank
Add long error explanation for E0566

Part of #61137.
2019-10-07 10:36:48 +02:00
Mazdak Farrokhzad
3a1f8dfeb8
Rollup merge of #65137 - andjo403:selfProfiling_fix, r=michaelwoerister
remove event that causes panics in measureme tools

the measureme tools summarize and crox do not alow a event to go out of scope of the parent event

codegen_and_optimize_crate ends after the codegen_crate event

r? @wesleywiser
cc @michaelwoerister @Mark-Simulacrum
2019-10-07 10:36:46 +02:00
Mazdak Farrokhzad
0c96a12909
Rollup merge of #63948 - crlf0710:path_to_raw_dylib, r=Centril
Add feature gate for raw_dylib.

This PR adds the feature gate for RFC 2627 (https://github.com/rust-lang/rust/issues/58713). It doesn't contain the actual functionality.
Add I'm not sure whether i did it correctly, since this is the first time i did this.

r? @Centril
2019-10-07 10:36:45 +02:00
Felix S Klock II
00bf29bded
Update src/test/ui/nll/issue-63154-normalize.rs
review feedback

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-10-07 10:19:38 +02:00
ben
74eac929c2 Test diagnostic output of type mismatches for types that have const
generics arguments.
2019-10-07 20:39:08 +13:00
Charles Lew
2dab187024 Fix compilation error after rebase. 2019-10-07 14:33:49 +08:00
bors
f92f3c4bc6 Auto merge of #64739 - guanqun:remove-as-str, r=estebank
Remove as_str if the type is already &str

Fix https://github.com/rust-lang/rust/issues/62642

r? @estebank

do you think the suggestion tip is good enough?
2019-10-07 05:35:17 +00:00
Mazdak Farrokhzad
6b23c22cca syntax: refactor with new fn parse_use_tree_glob_or_nested. 2019-10-07 06:47:24 +02:00
Mazdak Farrokhzad
9c6582a2c0 syntax: use parse_extern_abi more. 2019-10-07 06:18:47 +02:00
Charles Lew
dda10f2a2a Add more tests, fix span issue, improve diagnostics. 2019-10-07 12:01:57 +08:00
Charles Lew
eb492455f2 Address review comments. 2019-10-07 12:01:56 +08:00
Charles Lew
3462b58f21 Add support for parsing #[link_ordinal] attribute. 2019-10-07 12:01:55 +08:00
Charles Lew
e70ffed9cd Add feature gate for raw_dylib. 2019-10-07 12:01:54 +08:00
Mazdak Farrokhzad
a7ba754b6c syntax: unify and simplify fn signature parsing. 2019-10-07 06:01:38 +02:00
Mazdak Farrokhzad
7f9638d5d4 syntax: unify trait parsing a bit. 2019-10-07 06:01:38 +02:00
Mazdak Farrokhzad
090f3fd0c9 syntax: further item parsing cleanup 2019-10-07 06:01:38 +02:00
Mazdak Farrokhzad
3bdbfbe8b9 syntax: de-dups in item parsing. 2019-10-07 05:59:56 +02:00
Mazdak Farrokhzad
e0fe4be465 syntax: cleanup associated const parsing. 2019-10-07 05:59:56 +02:00
Nicholas Nethercote
9267d9fe5b Remove force_ex!. 2019-10-07 11:59:28 +11:00
bors
4ac4809ccf Auto merge of #64906 - Aaron1011:feature/extern-const-fn, r=Centril
Add support for `const unsafe? extern fn`

This works just as you might expect - an `const extern fn` is a `const fn` that is callable from foreign code.

Currently, panicking is not allowed in `const`s. When https://github.com/rust-lang/rfcs/pull/2345 (https://github.com/rust-lang/rust/issues/51999) is stabilized, then panicking in an `const extern fn` will produce a compile-time error when invoked at compile time, and an abort when invoked at runtime.

Since this is extending the language (we're allowing the `const` keyword in a new context), I believe that this will need an FCP. However, it's a very minor change, so I didn't think that filing an RFC was necessary.

This will allow libc (and other FFI crates) to make many functions `const`, without having to give up on making them `extern` as well.

Tracking issue: https://github.com/rust-lang/rust/issues/64926.
2019-10-07 00:12:12 +00:00
Nicholas Nethercote
1183d60cd5 Remove def_id!. 2019-10-07 09:35:47 +11:00
Nicholas Nethercote
8f707c3a98 Remove krate!. 2019-10-07 09:35:47 +11:00
Nicholas Nethercote
90c456e732 Remove force!. 2019-10-07 09:35:47 +11:00