Commit Graph

97539 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
352c6d036f
.gitignore: Readd /tmp/
It is produced during `./x.py test`
2019-08-10 08:47:22 +02:00
bors
d19a359444 Auto merge of #63428 - Centril:rollup-c2ru1z1, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #63056 (Give built-in macros stable addresses in the standard library)
 - #63337 (Tweak mismatched types error)
 - #63350 (Use associated_type_bounds where applicable - closes #61738)
 - #63394 (Add test for issue 36804)
 - #63399 (More explicit diagnostic when using a `vec![]` in a pattern)
 - #63419 (check against more collisions for TypeId of fn pointer)
 - #63423 (Mention that tuple structs are private if any of their fields are)

Failed merges:

r? @ghost
2019-08-10 06:14:13 +00:00
Mazdak Farrokhzad
019f6fed28
Rollup merge of #63423 - estebank:priv-tuple, r=zackmdavis
Mention that tuple structs are private if any of their fields are

CC #39703
2019-08-10 08:13:25 +02:00
Mazdak Farrokhzad
a029ce80a6
Rollup merge of #63419 - RalfJung:typeid, r=alexcrichton
check against more collisions for TypeId of fn pointer

Cc https://github.com/rust-lang/rfcs/pull/2738#issuecomment-519923318
2019-08-10 08:13:24 +02:00
Mazdak Farrokhzad
9e613c74be
Rollup merge of #63399 - estebank:vec-in-pat, r=Centril
More explicit diagnostic when using a `vec![]` in a pattern

```
error: unexpected `(` after qualified path
  --> $DIR/vec-macro-in-pattern.rs:3:14
   |
LL |         Some(vec![x]) => (),
   |              ^^^^^^^
   |              |
   |              unexpected `(` after qualified path
   |              in this macro invocation
   |              use a slice pattern here instead
   |
   = help: for more information, see https://doc.rust-lang.org/edition-guide/rust-2018/slice-patterns.html
   = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
```

Fix #61933.
2019-08-10 08:13:22 +02:00
Mazdak Farrokhzad
5ed195baaa
Rollup merge of #63394 - jackh726:issue-36804, r=jonas-schievink
Add test for issue 36804

I slightly reduced the repro that ICEs on nightly-2017-01-20.

Closes #36804
2019-08-10 08:13:21 +02:00
Mazdak Farrokhzad
6743ad6726
Rollup merge of #63350 - iluuu1994:use-associated-type-bounds, r=Centril
Use associated_type_bounds where applicable - closes #61738
2019-08-10 08:13:19 +02:00
Mazdak Farrokhzad
52f9e80e5f
Rollup merge of #63337 - estebank:break-ee0308, r=Centril
Tweak mismatched types error

- Change expected/found for type mismatches in `break`
- Be more accurate when talking about diverging match arms
- Tweak wording of function without a return value
- Suggest calling bare functions when their return value can be coerced to the expected type
- Give more parsing errors when encountering `foo(_, _, _)`

Fix #51767, fix #62677, fix #63136, cc #37384, cc #35241, cc #51669.
2019-08-10 08:13:17 +02:00
Mazdak Farrokhzad
eb44561600
Rollup merge of #63056 - petrochenkov:macstd2, r=alexcrichton
Give built-in macros stable addresses in the standard library

Continuation of https://github.com/rust-lang/rust/pull/62086.

Derive macros corresponding to traits from libcore are now available through the same paths as those traits:
- `Clone` - `{core,std}::clone::Clone`
- `PartialEq` - `{core,std}::cmp::PartialEq`
- `Eq` - `{core,std}::cmp::Eq`
- `PartialOrd` - `{core,std}::cmp::PartialOrd`
- `Ord` - `{core,std}::cmp::Ord`
- `Default` - `{core,std}::default::Default`
- `Debug` - `{core,std}::fmt::Debug`
- `Hash` - `{core,std}:#️⃣:Hash`
- `Copy` - `{core,std}::marker::Copy`

Fn-like built-in macros are now available through libcore and libstd's root module, by analogy with non-builtin macros defined by libcore and libstd:
```rust
{core,std}::{
    __rust_unstable_column,
    asm,
    assert,
    cfg,
    column,
    compile_error,
    concat,
    concat_idents,
    env,
    file,
    format_args,
    format_args_nl,
    global_asm,
    include,
    include_bytes,
    include_str,
    line,
    log_syntax,
    module_path,
    option_env,
    stringify,
    trace_macros,
}
```

Derive macros without a corresponding trait in libcore or libstd are still available only through prelude (also see https://github.com/rust-lang/rust/pull/62507).
Attribute macros also keep being available only through prelude, mostly because they don't have an existing practice to follow. An advice from the library team on their eventual placement would be appreciated.
```rust
    RustcDecodable,
    RustcEncodable,
    bench,
    global_allocator,
    test,
    test_case,
```

r? @alexcrichton
2019-08-10 08:13:16 +02:00
bors
be8bbb0697 Auto merge of #62756 - newpavlov:stabilize_dur_float, r=alexcrichton
Stabilize duration_float

Closes: #54361
2019-08-10 01:16:48 +00:00
Mark Rousskov
1ee37cd872 Cleanup historical stability comments
These weren't removed by ccbcc720a6 most likely by accident,
let's clean them up now.
2019-08-09 19:25:34 -04:00
bors
0ff76ad8dd Auto merge of #63415 - nikic:bump-llvm-2, r=alexcrichton
Update LLVM submodule

Fixes #63361.

r? @alexcrichton
2019-08-09 21:20:48 +00:00
Vadim Petrochenkov
cbcc7dd182 Give built-in macros stable addresses in the standard library 2019-08-10 00:05:37 +03:00
Esteban Küber
b9865d9e3f Mention that tuple structs are private if their fields are 2019-08-09 12:52:02 -07:00
Ralf Jung
4dd96d2b0f check against more collisions for TypeId of fn pointer 2019-08-09 20:10:39 +02:00
Nikita Popov
d8ae1dc3a5 Update LLVM submodule 2019-08-09 19:17:18 +02:00
Esteban Küber
75c5ad2e82 review comments: use structured suggestion 2019-08-09 09:40:26 -07:00
Joel Galenson
b6767b3096 Stop test from running on Windows. 2019-08-09 09:24:45 -07:00
Ralf Jung
3af92cbaf3 update Miri 2019-08-09 18:14:56 +02:00
Esteban Küber
7c96d90c20 More explicit diagnostic when using a vec![] in a pattern
```
error: unexpected `(` after qualified path
  --> $DIR/vec-macro-in-pattern.rs:3:14
   |
LL |         Some(vec![x]) => (),
   |              ^^^^^^^
   |              |
   |              unexpected `(` after qualified path
   |              in this macro invocation
   |              use a slice pattern here instead
   |
   = help: for more information, see https://doc.rust-lang.org/edition-guide/rust-2018/slice-patterns.html
   = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
```
2019-08-09 08:20:13 -07:00
Esteban Küber
45a5bc7619 fix tests 2019-08-09 07:57:16 -07:00
Mikail Bagishov
740f8db855
Add FIXME-s that some types should be transparent 2019-08-09 17:41:40 +03:00
Esteban Küber
bc1a4f52e3 review comments: typo and rewording 2019-08-09 07:18:05 -07:00
Esteban Küber
33d1082d6e review comment: review wording or missing return error 2019-08-09 07:18:05 -07:00
Esteban Küber
5a54945b6f Extend suggestion support for traits and foreign items 2019-08-09 07:18:05 -07:00
Esteban Küber
52da091ee6 Differentiate between tuple structs and tuple variants 2019-08-09 07:18:05 -07:00
Esteban Küber
efa62d66e3 Tweak wording of fn without explicit return 2019-08-09 07:18:05 -07:00
Esteban Küber
0d53f699ea review comments 2019-08-09 07:18:05 -07:00
Esteban Küber
b7f7756566 Recover parser from foo(_, _) 2019-08-09 07:18:05 -07:00
Esteban Küber
195d837f18 When suggesting fn call use an appropriate number of placeholder arguments 2019-08-09 07:18:05 -07:00
Esteban Küber
94fe8a3c17 Suggest calling function on type error when finding bare fn 2019-08-09 07:18:05 -07:00
Esteban Küber
01a61394f8 Change wording for function without return value
Fix #62677
2019-08-09 07:18:05 -07:00
Esteban Küber
4fbbf99c50 Be more accurate when mentioning type of found match arms 2019-08-09 07:18:05 -07:00
Esteban Küber
799b13ada5 Do not suggest using ! with break 2019-08-09 07:18:05 -07:00
Esteban Küber
c076392143 Tweak mismatched types error on break expressions 2019-08-09 07:18:05 -07:00
bors
534b42394d Auto merge of #63408 - Centril:rollup-skqrez3, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #62672 (Deprecate `try!` macro)
 - #62950 (Check rustbook links on all platforms when running locally)
 - #63114 (Remove gensym in format_args)
 - #63397 (Add tests for some ICEs)
 - #63403 (Improve test output)
 - #63404 (enable flt2dec tests in Miri)
 - #63407 (reduce some test sizes in Miri)

Failed merges:

r? @ghost
2019-08-09 12:14:57 +00:00
Mazdak Farrokhzad
4e3c209b67
Rollup merge of #63407 - RalfJung:miri-test-sizes, r=Centril
reduce some test sizes in Miri
2019-08-09 14:07:35 +02:00
Mazdak Farrokhzad
14ec32e20a
Rollup merge of #63404 - RalfJung:flt2dec, r=Centril
enable flt2dec tests in Miri

With ldexp implemented (thanks to @christianpoveda), we can finally enable these tests in Miri. Well, most of them -- some are just too slow.
2019-08-09 14:07:34 +02:00
Mazdak Farrokhzad
171e8457d0
Rollup merge of #63403 - sntdevco:master, r=Centril
Improve test output

I'm continuing to improve the test output for liballoc and libcore
2019-08-09 14:07:32 +02:00
Mazdak Farrokhzad
7a251629a2
Rollup merge of #63397 - JohnTitor:add-tests-for-ices, r=Centril
Add tests for some ICEs

Closes #43623
Closes #44405

r? @Centril
2019-08-09 14:07:31 +02:00
Mazdak Farrokhzad
714c8ea9b5
Rollup merge of #63114 - matthewjasper:hygienic-format-args, r=petrochenkov
Remove gensym in format_args

This also fixes some things to allow us to export opaque macros from libcore:

* Don't consider items that are only reachable through opaque macros as public/exported (so they aren't linted as needing docs)
* Mark private items reachable from the root of libcore as unstable - they are now reachable (in principle) in other crates via macros in libcore

r? @petrochenkov
2019-08-09 14:07:29 +02:00
Mazdak Farrokhzad
a03872645f
Rollup merge of #62950 - mati865:linkcheck, r=alexcrichton
Check rustbook links on all platforms when running locally

cc https://github.com/rust-lang/rust/issues/62739
2019-08-09 14:07:28 +02:00
Mazdak Farrokhzad
03c524e0f5
Rollup merge of #62672 - lzutao:deprecated-try-macro, r=Centril
Deprecate `try!` macro

Replaces #62077

Fixes rust-lang/rust-clippy#1361
Fixes #61000
2019-08-09 14:07:26 +02:00
Ralf Jung
78caca00d7 explain Miri disabling 2019-08-09 13:55:22 +02:00
Ilija Tovilo
77bfd7fd1a
Don't use associated type bounds in docs until it is stable 2019-08-09 13:40:54 +02:00
Ralf Jung
73edef7fdc reduce some test sizes in Miri 2019-08-09 12:12:24 +02:00
Ilija Tovilo
3d231accee
Add missing #![feature(associated_type_bounds)] 2019-08-09 11:19:45 +02:00
Ralf Jung
29ca428ffa Miri is really slow 2019-08-09 11:18:40 +02:00
Mateusz Mikuła
c7e16c5f47 Check links on all platforms when running locally 2019-08-09 10:32:34 +02:00
bors
813a3a5d4b Auto merge of #63302 - nikic:bump-llvm, r=alexcrichton
Update LLVM submodule

This pulls in a newer version of the LLVM 9 release branch.

Fixes #62932.

r? @alexcrichton
2019-08-09 08:24:43 +00:00