Commit Graph

86988 Commits

Author SHA1 Message Date
Matthias Krüger
dc0bbd0b31 submodules: update clippy from b2601beb to 29bf75cd
Changes:
````
Fix ty::TyKind usage
Fix TyKind::<kind> usage in codebase
Extract single_match_else UI test
cargo fmt
Adds inequality cases to bool comparison lint
Remove unsafe_vector_initialization lint
Fix wildcard_dependencies false positive
Fix rustfmt format
Disable incremental build for windows
Travis: Add rustc sysroot bin to PATH for windows build
Fix some nursery links
Enforce LF lineendings for everything
Mention triage procedure in contributing.md
Keep testing large_digit_groups as ui test
Keep testing unsafe_vector_initialization as ui test
Downgrade large_digit_groups to pedantic
Downgrade unsafe_vector_initialization to restriction
remove macro_at_most_once_rep feature attribute since it's stable
Add missing word
Update docs in regards to the merged RFC
Document how to run rustfmt in CONTRIBUTING.md
Don't run integration tests in forks
Fix some formatting issues
Run rustfmt on clippy_lints
Run rustfmt on build.rs
Run rustfmt on clippy_dev
Run rustfmt on rustc_tools_util
Run rustfmt on src
Run rustfmt on the tests
Let travis run cargo fmt --all -- --check
Error on line overflow
````
2018-12-05 15:31:30 +01:00
bors
93ac09c3b5 Auto merge of #55466 - sinkuu:cleanup, r=petrochenkov
syntax: Use iterator and pattern APIs instead of `char_at`

Iterating over chars with the `char_at(str, i)` `i += ch.len_utf8()` loop seems unidiomatic.
2018-12-05 13:56:07 +00:00
bors
21cb46a6e9 Auto merge of #55922 - oli-obk:slice_pat_ice, r=zackmdavis
Fix ICE in `const` slice patterns

fixes #55911

based on https://github.com/rust-lang/rust/pull/55915

New commits start at eabc1551e0d0953f1951020afb5919ab4c129cf5
2018-12-05 07:16:17 +00:00
Shotaro Yamada
6cfbb5b9a1 Remove unused dependency (rustc_lint -> rustc_mir) 2018-12-05 14:06:32 +09:00
Shotaro Yamada
f423ff7be8 Fix pretty test 2018-12-05 12:15:28 +09:00
bors
d8046ed51a Auto merge of #56519 - steveklabnik:edition-guide, r=pietroalbini
update edition guide

spiritual successor to https://github.com/rust-lang/rust/pull/56457

not to be backported, being in nightly is enough.

i'm testing this locally now but figure travis can test it in parallel
2018-12-05 02:24:35 +00:00
John-John Tedro
3512fb0467 Avoid extra copy and syscall in std::env::current_exe 2018-12-05 02:55:12 +01:00
Matthew Russo
f0f8aa9e05 adds DocTest filename variant, refactors doctest_offset out of source_map, fixes remaining test failures 2018-12-04 19:52:42 -05:00
John Heitmann
5d7cf59e94 Added trailing newline 2018-12-04 16:13:04 -08:00
John Heitmann
56ace3e870 Added a bare-bones eslint config (removing jslint)
This change removes the small bit of jslint config, replacing it
with eslint. I've currently configured eslint to mostly only report
the more serious of lints, although there are still some style nits
turned on.

Upcoming changes will start fixing lints.
2018-12-04 15:46:15 -08:00
Matthew Russo
88130f1796 updates all Filename variants to take a fingerprint 2018-12-04 17:24:12 -05:00
Matthew Russo
6ee4d3cafc new_source_file no longer enters duplicate files, expand_include_bytes includes the source if it can convert bytes to string 2018-12-04 17:19:55 -05:00
Steve Klabnik
6b0ac4987a build the edition guide
and update it so that links are correct
2018-12-04 17:06:16 -05:00
bors
b3af09205b Auto merge of #56486 - matthewjasper:propagate-all-closure-bounds, r=pnkfelix
Propagate all closure requirements to the caller

Closes #56477

This should be backported to 1.32 if it doesn't make the cut.

r? @pnkfelix
cc @nikomatsakis
2018-12-04 20:56:11 +00:00
Matthew Jasper
b2e6da7a7f Call methods on the right tcx
There are two `TyCtxt`s, one global, one local. Methods must be called
on the right one, as they differ by invariant lifetimes.
2018-12-04 19:52:47 +00:00
Corey Farwell
9012af6f19 Utilize ? instead of return None. 2018-12-04 08:57:34 -08:00
bors
906deae079 Auto merge of #56244 - oli-obk:loud_ui_errors, r=nikomatsakis
Report failing tests without `//~ ERROR` comments

r? @nikomatsakis
2018-12-04 16:26:18 +00:00
bors
431e0ab62f Auto merge of #55871 - ljedrz:llvm_back_allocations, r=nagisa
codegen_llvm_back: improve allocations

This commit was split out from https://github.com/rust-lang/rust/pull/54864. Last time it was causing an LLVM OOM, which was most probably caused by not collecting the globals.

- preallocate vectors of known length
- `extend` instead of `append` where the argument is consumable
- turn 2 `push` loops into `extend`s
- create a vector from a function producing one instead of using `extend_from_slice` on it
- consume `modules` when no longer needed
- ~~return an `impl Iterator` from `generate_lto_work`~~
- ~~don't `collect` `globals`, as they are iterated over and consumed right afterwards~~

While I'm hoping it won't cause an OOM anymore, I would still consider this a "high-risk" PR and not roll it up.
2018-12-04 11:47:07 +00:00
ljedrz
d0c64bb296 cleanup: remove static lifetimes from consts 2018-12-04 12:46:10 +01:00
Guillaume Gomez
e41e85cb5c Fix line numbers display 2018-12-04 11:33:57 +01:00
Oliver Scherer
cb71752f91 Tidy fixup 2018-12-04 11:04:54 +01:00
Georg Semmler
956b03f7db
Add a test case for inlining the docs of a macro reexport 2018-12-04 10:24:17 +01:00
Georg Semmler
9d4e17ae1a
Remove support for proc macro doc inlining 2018-12-04 10:23:30 +01:00
Georg Semmler
11fb023d4f
Allow renaming macro 2018-12-04 10:23:13 +01:00
ljedrz
8c4129cd9a cleanup: remove static lifetimes from consts in libstd 2018-12-04 10:21:42 +01:00
bors
58e9832a0d Auto merge of #56224 - ehuss:update-cargo, r=alexcrichton
Update cargo, rls

26 commits in b3d0b2e545b61d4cd08096911724b7d49d213f73..5e85ba14aaa20f8133863373404cb0af69eeef2c
2018-11-15 19:13:04 +0000 to 2018-12-02 14:37:25 +0000
- ConflictStoreTrie: Faster filtered search (rust-lang/cargo#6366)
- Remove `cmake` as a requirement (rust-lang/cargo#6368)
- progress: display "Downloading 1 crate" instead of "Downloading 1 crates" (rust-lang/cargo#6369)
- Use expect over unwrap, for panic-in-panic aborts (rust-lang/cargo#6364)
- Switch to pretty_env_logger, under --features pretty-env-logger (rust-lang/cargo#6362)
- use allow-dirty option in `cargo package` to skip vcs checks (rust-lang/cargo#6280)
- remove clones made redundant by Intern PackageId (rust-lang/cargo#6352)
- docs: correct profile usage of `cargo test --release` (rust-lang/cargo#6345)
- Improve doc for `cargo install` (rust-lang/cargo#6354)
- Intern PackageId (rust-lang/cargo#6332)
- Clean only release artifacts if --release option is set (rust-lang/cargo#6349)
- remove clones made redundant by Intern SourceId (rust-lang/cargo#6347)
- Intern SourceId (rust-lang/cargo#6342)
- Tweak Layout to allow for non json file targets with internal "." (rust-lang/cargo#6255)
- Correct Target Directory command-line option (rust-lang/cargo#6343)
- Persistent data structures by im-rs (rust-lang/cargo#6336)
- Move command prelude into main library (rust-lang/cargo#6335)
- Distinguish custom build invocations (rust-lang/cargo#6331)
- Allow crate_type=bin examples to run (rust-lang/cargo#6330)
- Make verify-project honour unstable features (rust-lang/cargo#6326)
- Make autodiscovery disable inferred targets (rust-lang/cargo#6329)
- Add `c` alias for `check` (rust-lang/cargo#6218)
- Allow user aliases to override built-in aliases (rust-lang/cargo#6259)
- Fix renaming directory project using build scripts with cross-compiling. (rust-lang/cargo#6328)
- Fix add_plugin_deps-related tests. (rust-lang/cargo#6327)
- Add a glossary. (rust-lang/cargo#6321)
2018-12-04 09:21:21 +00:00
Oliver Scherer
f4115765c5 Intrinsic checks are just needed for qualify_min_const_fn 2018-12-04 10:17:37 +01:00
Oliver Scherer
b77969466c Clear up some code 2018-12-04 10:17:37 +01:00
Oliver Scherer
932dbe816e Explain unsafety trickery of const functions 2018-12-04 10:17:37 +01:00
Oliver Scherer
b75d5f1867 Clean up the logic in is_min_const_fn 2018-12-04 10:17:37 +01:00
Oliver Scherer
ae0b00cada Add and update tests 2018-12-04 10:17:37 +01:00
Oliver Scherer
137a640d61 Automatically generate imports for newtype_index Deserialize impls 2018-12-04 10:17:37 +01:00
Oliver Scherer
3ce211dbd0 Increase code-reuse and -readability 2018-12-04 10:17:37 +01:00
Oliver Scherer
37ef5e43af Add tests for stable unsafe features in const fn 2018-12-04 10:17:37 +01:00
Oliver Scherer
4497ff3762 Emit feature gate suggestion 2018-12-04 10:17:36 +01:00
Oliver Scherer
e5d90652e2 Comment on the unsafety code for layout constrained fields 2018-12-04 10:17:36 +01:00
Oliver Scherer
55abc0bc90 Also prevent mutation fields directly 2018-12-04 10:17:36 +01:00
Oliver Scherer
1894a5fe2c Also make immutable references to non-freeze restricted value range types unsafe 2018-12-04 10:17:36 +01:00
Oliver Scherer
081c49783f generalize the message about the creation of layout restricted types 2018-12-04 10:17:36 +01:00
Oliver Scherer
c4a850078c Adjust a rustc test to the safety changes 2018-12-04 10:17:36 +01:00
Oliver Scherer
14218e3969 Trailing newlines again 2018-12-04 10:17:36 +01:00
Oliver Scherer
8bdb11c4d9 Forbid the creation of mutable borrows to fields of layout constrained types 2018-12-04 10:17:36 +01:00
Oliver Scherer
693c55372e Move ref to packed struct field check into projection arm 2018-12-04 10:17:36 +01:00
Oliver Scherer
ec6573f33b Make newtype_index safe 2018-12-04 10:17:36 +01:00
Oliver Scherer
02b22323f1 Make sure the initialization of constrained int range newtypes is unsafe 2018-12-04 10:17:36 +01:00
Oliver Scherer
cc3470ce3b Add test for dereferencing raw pointers and immediately referencing again 2018-12-04 10:17:36 +01:00
Oliver Scherer
906a49eef2 Document unsafe rules with comments and bug! calls 2018-12-04 10:17:36 +01:00
Oliver Scherer
f2ae7b78d6 Allow calling const unsafe fn in const fn behind a feature gate 2018-12-04 10:17:36 +01:00
Bastian Gruber
450a8a6f35 Add extra comment slash 2018-12-04 10:10:07 +01:00
Oliver Scherer
ff97569dd9 Update doc-ui tests 2018-12-04 10:06:05 +01:00