Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 12 pull requests #76054

Closed
wants to merge 204 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
2d1515a
Miri: Renamed "undef" to "uninit"
pnadon Aug 8, 2020
a77e881
should_impl_trait - ignore methods with lifetime params
tnielens Jun 16, 2020
2bc0ecd
should_implement_trait - add test cases for every checked trait method
tnielens Jun 19, 2020
e6b2254
should_implement_trait - pr remarks
tnielens Jun 20, 2020
7cc1a2e
should_implement_trait - filter on explicit lifetime param only
tnielens Jun 23, 2020
166c520
should_impl_trait - pr comments
tnielens Jul 29, 2020
f9ba829
should_impl_trait - self linting
tnielens Aug 9, 2020
3e3e50b
Add example of false positive to PTR_ARG docs.
Ryan1729 Aug 10, 2020
fbf637d
formatting
Ryan1729 Aug 10, 2020
91aa55d
Rollup merge of #75226 - pnadon:miri-undef-uninit, r=RalfJung
JohnTitor Aug 11, 2020
b8713e3
unnecessary-mut-passed: make lint message say if fn is a function or …
matthiaskrgr Aug 11, 2020
3337f79
Auto merge of #5892 - matthiaskrgr:redundant_mut, r=flip1995
bors Aug 11, 2020
c0a9d64
stable-sort-primitive: make lint adhere to lint message convention
matthiaskrgr Aug 11, 2020
ac194ca
map_clone: make lint adhere to lint message convention
matthiaskrgr Aug 11, 2020
04867e0
mutex-atomic: make lint adhere to lint message convention
matthiaskrgr Aug 11, 2020
6af297f
iter-next-slice: make lint adhere to lint message convention
matthiaskrgr Aug 11, 2020
f171f89
int_plus_one: make lint adhere to lint message convention
matthiaskrgr Aug 11, 2020
bdf4dc3
implicit-saturating-sub: make lint adhere to lint message convention
matthiaskrgr Aug 11, 2020
1f17c3b
multiple_inherent_impl: make lint adhere to lint message convention
matthiaskrgr Aug 11, 2020
4236156
pub-enum-variant-names: make lint adhere to lint message convention
matthiaskrgr Aug 11, 2020
2de290d
duration-subsec: make lint adhere to lint message convention
matthiaskrgr Aug 11, 2020
db390f5
enum-clike-unportable-variant: tweak message a bit (Clike -> C-like)
matthiaskrgr Aug 11, 2020
89591a7
enum-variant-names: make lint adhere to lint message convention
matthiaskrgr Aug 11, 2020
605e027
if_let_some_result: make lint adhere to lint message convention
matthiaskrgr Aug 11, 2020
be3e695
if_not_else: make lint adhere to lint message convention
matthiaskrgr Aug 11, 2020
027780c
Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup
flip1995 Aug 11, 2020
fdc2f87
Auto merge of #75405 - flip1995:clippyup, r=Manishearth
bors Aug 12, 2020
8a96b9c
write.rs: don't clone TokenStream
matthiaskrgr Aug 12, 2020
7d2e42d
fix typo pointed out in review comment
Ryan1729 Aug 12, 2020
318c74a
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Aug 12, 2020
3ed0a4c
Auto merge of #5898 - flip1995:rustup, r=flip1995
bors Aug 12, 2020
2f4de2f
Auto merge of #5885 - Ryan1729:patch-2, r=flip1995
bors Aug 12, 2020
0fc61be
Add the other overloadable operations to suspicious_arithmetic_impl
Ryan1729 Aug 10, 2020
616682d
formatting
Ryan1729 Aug 10, 2020
c705817
trailing comma
Ryan1729 Aug 10, 2020
f4eeff9
add tests for Rem, BitAnd, BitOr, BitXor, Shl, and Shr
Ryan1729 Aug 12, 2020
c73cf9f
Auto merge of #5893 - matthiaskrgr:lint_msg, r=yaahc
bors Aug 12, 2020
7bd7a46
run tests/ui/update-references.sh to update 'suspicious_arithmetic_im…
Ryan1729 Aug 12, 2020
439bae6
Auto merge of #5884 - Ryan1729:patch-1, r=flip1995
bors Aug 12, 2020
480ccc3
Change Rc<Box<T>> recommendation to be Rc<T> instead of Box<T>
JarredAllen Aug 12, 2020
dc1e09b
Auto merge of #5897 - matthiaskrgr:no_clone_tts, r=flip1995
bors Aug 12, 2020
5634c8d
Fix: keep parenthesis for suggestion in `useless_conversion` lint
ThibsG Aug 12, 2020
4e28d99
Replace panics with early returns
JarredAllen Aug 12, 2020
9f827ab
Add reference to rustc-dev-guide about lint message
giraffate Aug 13, 2020
fc4fd91
Auto merge of #5900 - ThibsG:ParensUselessConversion4750, r=phansch
bors Aug 13, 2020
d5f5487
Auto merge of #5899 - JarredAllen:rc-box-suggestion, r=yaahc
bors Aug 13, 2020
ba363bd
Auto merge of #5901 - giraffate:add_reference_to_rustc_dev_guide, r=m…
bors Aug 13, 2020
429a1ce
merge `as_local_hir_id` with `local_def_id_to_hir_id`
lcnr Aug 12, 2020
48a1425
docs: typo in `temporary_cstring_as_ptr`: s/point/&s
ErichDonGubler Aug 13, 2020
8ecc0fc
Auto merge of #5905 - ErichDonGubler:patch-1, r=flip1995
bors Aug 13, 2020
8514b84
appreciative too_large_for_stack in useless `vec!`
wiomoc Aug 14, 2020
8e54997
Don't use `to_string` in impl Display
Jul 22, 2020
f98ffa2
Fix FP for `same_item_push`
giraffate Aug 14, 2020
72d2c2e
Lint `push_str` with a single-character string literal
wiomoc Aug 9, 2020
ae56e98
Merge lint with `single_char_pattern`
wiomoc Aug 14, 2020
b381ade
elide lifetimes
wiomoc Aug 14, 2020
f0cc006
Auto merge of #5910 - flip1995:rustup, r=flip1995
bors Aug 15, 2020
6d18fe7
Make needless_return a late lint pass
jrqc Aug 12, 2020
85f4ef0
Visitor added
jrqc Aug 12, 2020
65d10c7
Borrow checker added
jrqc Aug 13, 2020
cd6ca72
Known problems changed
jrqc Aug 13, 2020
a7d5c2f
Modifications according to the code review
jrqc Aug 13, 2020
96efaee
cargo dev update_lints
jrqc Aug 13, 2020
baa4cb1
early return removed
jrqc Aug 14, 2020
1a140dc
Improve needless_doctest_main by using the parser
ebroto Aug 15, 2020
f8db258
Auto merge of #5912 - ebroto:needless_doctest_main_improvements, r=Ma…
bors Aug 16, 2020
e522ca3
Auto merge of #5831 - chansuke:to_string_in_display, r=flip1995
bors Aug 16, 2020
c8e05fc
Auto merge of #5881 - wiomoc:feature/single-char-push_str, r=ebroto,f…
bors Aug 16, 2020
dff7e74
Auto merge of #5903 - jrqc:needless_return, r=ebroto,flip1995
bors Aug 16, 2020
78857cc
Auto merge of #5907 - wiomoc:feature/useless-vec-max-size, r=flip1995
bors Aug 16, 2020
3bd9889
Auto merge of #5725 - montrivo:should-impl-trait, r=flip1995
bors Aug 16, 2020
a3ea65c
Implement new lint
bugadani Jun 15, 2020
923d612
Rename the changelog footnote as well
bugadani Jun 15, 2020
848af39
Add note to `or_fun_call`, list checked methods
bugadani Jun 15, 2020
a7cc5d4
Also simplify if the closure body is an index expression
bugadani Jun 15, 2020
d7220db
Run cargo dev update_lints
bugadani Jun 15, 2020
75637c1
Catch function calls in argument lists, add tests that tuples don't g…
bugadani Jun 15, 2020
a7083ee
Removed the extra lifetime parameter
bugadani Jul 26, 2020
94cf90e
Apply suggested change
bugadani Jul 26, 2020
9c41822
Apply suggested change
bugadani Jul 26, 2020
d8f0a14
Fix typo in description of unnecessary_mut_passed
HactarCE Aug 16, 2020
d71b418
Moved to submodule, don't trigger if map_unwrap_or does
bugadani Aug 16, 2020
8a14c11
Cleanup, explain return value
bugadani Aug 16, 2020
3b52d7f
run cargo dev fmt
bugadani Aug 16, 2020
b7ee868
Fix dogfooding test errors
bugadani Aug 16, 2020
5d723d0
Auto merge of #5913 - HactarCE:patch-1, r=flip1995
bors Aug 16, 2020
b175642
Fix missed rename
bugadani Aug 16, 2020
fc1e07e
Rename lint to use plural form
bugadani Aug 16, 2020
8d0d89a
Auto merge of #5720 - bugadani:new-lint, r=flip1995,yaahc
bors Aug 16, 2020
6afa4ef
Introduce function for comparing expression values
tmiasko Aug 16, 2020
9b800b1
Rename SpanlessEq::ignore_fn to deny_side_effects
tmiasko Aug 16, 2020
d1dbf79
Expresions with Assign / AssignOp have side effects
tmiasko Aug 16, 2020
4f4abf4
Warn about explicit self-assignment
tmiasko Aug 16, 2020
8332fe8
Auto merge of #5894 - tmiasko:self-assignment, r=Manishearth
bors Aug 16, 2020
99ba290
Improve code style
giraffate Aug 16, 2020
262db3b
deps: bump cargo_metadata and semver
matthiaskrgr Aug 17, 2020
838c201
Auto merge of #5915 - matthiaskrgr:deps_, r=Manishearth
bors Aug 17, 2020
f13d2bf
clippy: support `QPath::LangItem`
davidtwco Aug 4, 2020
9360ca6
Auto merge of #5908 - giraffate:fix_fp_for_same_item_push, r=flip1995
bors Aug 17, 2020
ae0eb39
rust_ast::ast => rustc_ast
ryzokuken Apr 27, 2020
4b0e6d5
Auto merge of #75120 - JulianKnodt:rm_reps, r=oli-obk
bors Aug 17, 2020
c680602
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Aug 18, 2020
6220dff
Auto merge of #5922 - flip1995:rustup, r=flip1995
bors Aug 18, 2020
df4d42f
transmute: avoid suggesting from/to bits in const
ebroto Aug 17, 2020
6a12bae
no from/to bits in const: add tests cases for f64
ebroto Aug 18, 2020
902b282
Improve lint message in `to_string_in_display`
giraffate Aug 19, 2020
c236c0f
Fix false positive in `PRECEDENCE` lint
Aug 20, 2020
191b080
Capture tokens for Pat used in macro_rules! argument
Aaron1011 Jul 27, 2020
d891954
Auto merge of #5919 - ebroto:5747_from_bits_in_const, r=matthiaskrgr
bors Aug 20, 2020
4104611
Auto merge of #5928 - mikerite:fix-5924, r=ebroto
bors Aug 20, 2020
11efd75
Fix false negative in `option_as_ref_deref`
Aug 21, 2020
c2799c8
Merge remote-tracking branch 'upstream/master' into sync-from-rust
ebroto Aug 21, 2020
146e352
run cargo dev fmt
ebroto Aug 21, 2020
1a26dbf
Auto merge of #5938 - ebroto:sync-from-rust, r=ebroto
bors Aug 21, 2020
aa3b04f
Auto merge of #5933 - mikerite:fix-5927, r=matthiaskrgr
bors Aug 21, 2020
b57ef14
Auto merge of #5926 - giraffate:improve_lint_message_in_to_string_in_…
bors Aug 22, 2020
03bc7ae
Add async test case for `wrong_self_convention` lint
ThibsG Aug 21, 2020
a8520b0
Auto merge of #5934 - ThibsG:WrongSelfTestCase4037, r=ebroto
bors Aug 22, 2020
191b6c7
Don't lint if it has always inline attribute
ThibsG Aug 22, 2020
5b07b9e
Widen understanding of prelude import
stchris Aug 20, 2020
53508ae
Run sh tests/ui/update-all-references.sh
stchris Aug 20, 2020
e615a26
Use more elegant way to check for prelude string
stchris Aug 21, 2020
f21d10b
Auto merge of #5929 - stchris:issues/5917, r=ebroto
bors Aug 22, 2020
dd07860
Auto merge of #5941 - ThibsG:InlineInCopyPassByRef, r=yaahc
bors Aug 22, 2020
e8d33d7
Fix `let_and_return` bad suggestion
Aug 23, 2020
6dd65b8
Fix cargo dev new_lint for late lint passes
ebroto Aug 20, 2020
eb8ede7
Improve documentation related to the sync process
ebroto Aug 23, 2020
8776db9
Fix ICE in `repeat_once` lint
ebroto Aug 23, 2020
91b200c
Fix fp in `borrow_interior_mutable_const`
rail-rain Aug 23, 2020
2d86cc5
Auto merge of #5930 - ebroto:dev_newlint_fix_lt, r=matthiaskrgr
bors Aug 23, 2020
27ae4d3
Auto merge of #5948 - ebroto:5944_repeat_ice, r=Manishearth
bors Aug 23, 2020
b05077e
Apply suggestions from PR review
ebroto Aug 23, 2020
b2c2266
Fix FP for `redundant_closure_call`
giraffate Aug 18, 2020
9fe0ac3
Avoid period in lint message according to convention
giraffate Aug 24, 2020
ce8915c
typo
rail-rain Aug 24, 2020
bc7ea6f
Shorten liballoc doc intra link while readable
pickfire Aug 24, 2020
3d820f7
Fix incorrect suggestion when `clone_on_ref_ptr` is triggered in macros
ThibsG Aug 24, 2020
680c681
Added a lint which corrects expressions like (a - b) < f32::EPSILON
1c3t3a Aug 24, 2020
8e0e179
Expand rustdoc theme chooser x padding
pickfire Aug 24, 2020
f38eb93
Fix clashing_extern_declarations false positive.
jumbatm Aug 24, 2020
e9964f2
stable_sort_primitive: print the type that is being sorted in the lin…
matthiaskrgr Aug 21, 2020
8d9a485
Auto merge of #5935 - matthiaskrgr:unstable_sort_ty_name, r=flip1995
bors Aug 24, 2020
1831f65
Fix typo in TLS Model in Unstable Book
ArekPiekarz Aug 24, 2020
48b4aea
Unbreak the clippy test
scottmcm Aug 24, 2020
64b53f3
Auto merge of #5920 - giraffate:fix_fp_for_redundant_closure_call, r=…
bors Aug 25, 2020
9102832
Fix incorrect comment
Aug 25, 2020
48d4736
Simplify fmt test by using the clippy dev alias
Aug 25, 2020
c7dc9c3
Fix intermittent build error
Aug 25, 2020
179df0b
Added F32::EPSILON and F64::EPSILON to paths.rs
1c3t3a Aug 25, 2020
f20f7f2
Improve theme button hover background color
GuillaumeGomez Aug 25, 2020
671770e
Also handle transparent single-variant enums
jumbatm Aug 25, 2020
2ea86af
Use same name as attr.
jumbatm Aug 25, 2020
352df40
Remove unnecessary assert.
jumbatm Aug 25, 2020
acc6b6c
Fix typo
flip1995 Aug 25, 2020
a4090d2
Add test for issue #27130
bugadani Aug 25, 2020
5ef345a
Auto merge of #5960 - flip1995:rustup, r=flip1995
bors Aug 25, 2020
ba43a43
Auto merge of #5947 - ebroto:rustup_doc_improvements, r=flip1995
bors Aug 25, 2020
f901559
Auto merge of #5952 - 1c3t3a:1c3t3a-dev-5819, r=Manishearth
bors Aug 25, 2020
f326668
Auto merge of #5958 - mikerite:fix-fmt-20200825, r=flip1995
bors Aug 25, 2020
3b1e5d6
Re-enable len_zero for ranges now that `is_empty` is stable on them
scottmcm Aug 25, 2020
e191151
Auto merge of #5961 - scottmcm:master, r=Manishearth
bors Aug 25, 2020
370fc45
Update clippy_lints/src/methods/mod.rs
ThibsG Aug 25, 2020
2879813
Move to intra doc links for core::ptr::non_null
poliorcetics Aug 25, 2020
ad7a03c
Auto merge of #5951 - ThibsG:FixMacroCloneOnRefPtr2076, r=ebroto
bors Aug 25, 2020
9d18c24
Fix typo
hkmatsumoto Aug 26, 2020
23db542
Auto merge of #5964 - matsujika:matsujika-patch-1, r=ebroto
bors Aug 26, 2020
9ef4479
Auto merge of #5949 - rail-rain:fix_fp_borrow_interior_mutable_const,…
bors Aug 26, 2020
894581b
Auto merge of #5946 - mikerite:fix-5729, r=flip1995
bors Aug 26, 2020
2d85314
Changed the location of the suggestion as well as the way the suggest…
1c3t3a Aug 26, 2020
64c4bb0
Auto merge of #5966 - 1c3t3a:1c3t3a-dev-5819-fix, r=Manishearth
bors Aug 26, 2020
edc05da
Fix the wrong use of `snippet_with_applicability`
rail-rain Aug 26, 2020
e45c59e
Auto merge of #5968 - rail-rain:fix_use_snippet_with_applicability, r…
bors Aug 26, 2020
91024f1
Add new lint to prevent usage of unwrap in fns that return result
yaahc Aug 26, 2020
dead45f
Auto merge of #5957 - xvschneider:AddUnwrapInsideResultLint, r=yaahc
bors Aug 26, 2020
04bff17
Fix FP in `to_string_in_display`
giraffate Aug 27, 2020
2a3ee5f
Fix FP in `new_ret_no_self`: trigger in trait def instead of impl block
ThibsG Jul 7, 2020
3cb75c2
Remove expansion restriction + fix doc and tests naming
ThibsG Aug 25, 2020
5046126
Merge logic of looking for `Self` type
ThibsG Aug 27, 2020
970e779
Add __fastfail for Windows on arm/aarch64
rylev Aug 27, 2020
f0722c0
Switch to intra-doc links in `core::hash`
camelid Aug 23, 2020
046556e
Make sure the functions don't get merged
bugadani Aug 27, 2020
07c5e9e
Auto merge of #5971 - giraffate:fix_fp_in_to_string_in_display, r=ebroto
bors Aug 27, 2020
9cdcfe2
Fix loading pretty-printers in rust-lldb script
artemmukhin Aug 28, 2020
e8be047
Update clippy_lints/src/utils/mod.rs
ThibsG Aug 28, 2020
ffaadae
Update clippy_lints/src/utils/mod.rs
ThibsG Aug 28, 2020
73b1ee1
Update clippy_lints/src/methods/mod.rs
ThibsG Aug 28, 2020
2037ba4
bump Miri
RalfJung Aug 28, 2020
8bcc4d6
Switch to asm! macro and use brk instruction on ARM
rylev Aug 28, 2020
3d0b0e6
Auto merge of #5774 - ThibsG:FixNewRetNoSelf, r=ebroto
bors Aug 28, 2020
9e2228d
Back to opcode for 32 bit ARM __fastfail
rylev Aug 28, 2020
adc7351
Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup
flip1995 Aug 28, 2020
575e27d
Update Cargo.lock
flip1995 Aug 28, 2020
3ba0656
Rollup merge of #75852 - camelid:patch-3, r=jyn514
Dylan-DPC Aug 29, 2020
84d4ecc
Rollup merge of #75874 - pickfire:patch-3, r=jyn514
Dylan-DPC Aug 29, 2020
9b2aa09
Rollup merge of #75881 - pickfire:patch-5, r=GuillaumeGomez
Dylan-DPC Aug 29, 2020
f3c601c
Rollup merge of #75885 - jumbatm:issue75739-clashing-extern-declarati…
Dylan-DPC Aug 29, 2020
79fa19a
Rollup merge of #75892 - ArekPiekarz:unstable_book_tls_model_typo, r=…
Dylan-DPC Aug 29, 2020
f9e7b3e
Rollup merge of #75901 - GuillaumeGomez:ayu-theme-button-hover-backgr…
Dylan-DPC Aug 29, 2020
80b1a30
Rollup merge of #75910 - bugadani:testcase, r=oli-obk
Dylan-DPC Aug 29, 2020
21f2cf0
Rollup merge of #75917 - poliorcetics:intra-doc-core-nonnull, r=jyn514
Dylan-DPC Aug 29, 2020
214a80b
Rollup merge of #75990 - rylev:arm-fastfail, r=alexcrichton
Dylan-DPC Aug 29, 2020
3de529d
Rollup merge of #76015 - ortem:fix-lldb-script, r=Mark-Simulacrum
Dylan-DPC Aug 29, 2020
aad2a62
Rollup merge of #76016 - RalfJung:miri, r=RalfJung
Dylan-DPC Aug 29, 2020
34890c3
Rollup merge of #76034 - flip1995:clippyup, r=Manishearth
Dylan-DPC Aug 29, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ dependencies = [
name = "cargo-miri"
version = "0.1.0"
dependencies = [
"cargo_metadata 0.9.1",
"cargo_metadata 0.11.1",
"directories",
"rustc-workspace-hack",
"rustc_version",
Expand Down Expand Up @@ -518,15 +518,15 @@ dependencies = [
name = "clippy"
version = "0.0.212"
dependencies = [
"cargo_metadata 0.9.1",
"cargo_metadata 0.11.1",
"clippy-mini-macro-test",
"clippy_lints",
"compiletest_rs",
"derive-new",
"lazy_static",
"rustc-workspace-hack",
"rustc_tools_util 0.2.0",
"semver 0.9.0",
"semver 0.10.0",
"serde",
"tempfile",
"tester",
Expand All @@ -540,15 +540,15 @@ version = "0.2.0"
name = "clippy_lints"
version = "0.0.212"
dependencies = [
"cargo_metadata 0.9.1",
"cargo_metadata 0.11.1",
"if_chain",
"itertools 0.9.0",
"lazy_static",
"pulldown-cmark",
"quine-mc_cluskey",
"quote",
"regex-syntax",
"semver 0.9.0",
"semver 0.10.0",
"serde",
"smallvec 1.4.2",
"syn",
Expand Down Expand Up @@ -1991,7 +1991,6 @@ dependencies = [
name = "miri"
version = "0.1.0"
dependencies = [
"byteorder",
"colored",
"compiletest_rs",
"env_logger 0.7.1",
Expand Down
4 changes: 1 addition & 3 deletions library/alloc/src/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//!
//! # Examples
//!
//! You can explicitly create a [`Vec<T>`] with [`new`]:
//! You can explicitly create a [`Vec`] with [`Vec::new`]:
//!
//! ```
//! let v: Vec<i32> = Vec::new();
Expand Down Expand Up @@ -50,8 +50,6 @@
//! v[1] = v[1] + 5;
//! ```
//!
//! [`Vec<T>`]: Vec
//! [`new`]: Vec::new
//! [`push`]: Vec::push

#![stable(feature = "rust1", since = "1.0.0")]
Expand Down
31 changes: 8 additions & 23 deletions library/core/src/hash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
//! If you need more control over how a value is hashed, you need to implement
//! the [`Hash`] trait:
//!
//! [`Hash`]: trait.Hash.html
//!
//! ```rust
//! use std::collections::hash_map::DefaultHasher;
//! use std::hash::{Hash, Hasher};
Expand Down Expand Up @@ -149,11 +147,9 @@ mod sip;
/// Thankfully, you won't need to worry about upholding this property when
/// deriving both [`Eq`] and `Hash` with `#[derive(PartialEq, Eq, Hash)]`.
///
/// [`Eq`]: ../../std/cmp/trait.Eq.html
/// [`Hasher`]: trait.Hasher.html
/// [`HashMap`]: ../../std/collections/struct.HashMap.html
/// [`HashSet`]: ../../std/collections/struct.HashSet.html
/// [`hash`]: #tymethod.hash
/// [`hash`]: Hash::hash
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Hash {
/// Feeds this value into the given [`Hasher`].
Expand All @@ -168,8 +164,6 @@ pub trait Hash {
/// 7920.hash(&mut hasher);
/// println!("Hash is {:x}!", hasher.finish());
/// ```
///
/// [`Hasher`]: trait.Hasher.html
#[stable(feature = "rust1", since = "1.0.0")]
fn hash<H: Hasher>(&self, state: &mut H);

Expand All @@ -186,8 +180,6 @@ pub trait Hash {
/// Hash::hash_slice(&numbers, &mut hasher);
/// println!("Hash is {:x}!", hasher.finish());
/// ```
///
/// [`Hasher`]: trait.Hasher.html
#[stable(feature = "hash_slice", since = "1.3.0")]
fn hash_slice<H: Hasher>(data: &[Self], state: &mut H)
where
Expand Down Expand Up @@ -239,10 +231,9 @@ pub use macros::Hash;
/// println!("Hash is {:x}!", hasher.finish());
/// ```
///
/// [`Hash`]: trait.Hash.html
/// [`finish`]: #tymethod.finish
/// [`write`]: #tymethod.write
/// [`write_u8`]: #method.write_u8
/// [`finish`]: Hasher::finish
/// [`write`]: Hasher::write
/// [`write_u8`]: Hasher::write_u8
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Hasher {
/// Returns the hash value for the values written so far.
Expand All @@ -264,7 +255,7 @@ pub trait Hasher {
/// println!("Hash is {:x}!", hasher.finish());
/// ```
///
/// [`write`]: #tymethod.write
/// [`write`]: Hasher::write
#[stable(feature = "rust1", since = "1.0.0")]
fn finish(&self) -> u64;

Expand Down Expand Up @@ -433,8 +424,7 @@ impl<H: Hasher + ?Sized> Hasher for &mut H {
/// assert_eq!(hasher_1.finish(), hasher_2.finish());
/// ```
///
/// [`build_hasher`]: #tymethod.build_hasher
/// [`Hasher`]: trait.Hasher.html
/// [`build_hasher`]: BuildHasher::build_hasher
/// [`HashMap`]: ../../std/collections/struct.HashMap.html
#[stable(since = "1.7.0", feature = "build_hasher")]
pub trait BuildHasher {
Expand All @@ -456,8 +446,6 @@ pub trait BuildHasher {
/// let s = RandomState::new();
/// let new_s = s.build_hasher();
/// ```
///
/// [`Hasher`]: trait.Hasher.html
#[stable(since = "1.7.0", feature = "build_hasher")]
fn build_hasher(&self) -> Self::Hasher;
}
Expand All @@ -470,7 +458,7 @@ pub trait BuildHasher {
/// defined.
///
/// Any `BuildHasherDefault` is [zero-sized]. It can be created with
/// [`default`][method.Default]. When using `BuildHasherDefault` with [`HashMap`] or
/// [`default`][method.default]. When using `BuildHasherDefault` with [`HashMap`] or
/// [`HashSet`], this doesn't need to be done, since they implement appropriate
/// [`Default`] instances themselves.
///
Expand Down Expand Up @@ -503,10 +491,7 @@ pub trait BuildHasher {
/// let hash_map = HashMap::<u32, u32, MyBuildHasher>::default();
/// ```
///
/// [`BuildHasher`]: trait.BuildHasher.html
/// [`Default`]: ../default/trait.Default.html
/// [method.default]: #method.default
/// [`Hasher`]: trait.Hasher.html
/// [method.default]: BuildHasherDefault::default
/// [`HashMap`]: ../../std/collections/struct.HashMap.html
/// [`HashSet`]: ../../std/collections/struct.HashSet.html
/// [zero-sized]: https://doc.rust-lang.org/nomicon/exotic-sizes.html#zero-sized-types-zsts
Expand Down
36 changes: 16 additions & 20 deletions library/core/src/ptr/non_null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ use crate::slice::{self, SliceIndex};
/// it is your responsibility to ensure that `as_mut` is never called, and `as_ptr`
/// is never used for mutation.
///
/// [`PhantomData`]: ../marker/struct.PhantomData.html
/// [`UnsafeCell<T>`]: ../cell/struct.UnsafeCell.html
/// [`PhantomData`]: crate::marker::PhantomData
/// [`UnsafeCell<T>`]: crate::cell::UnsafeCell
#[stable(feature = "nonnull", since = "1.25.0")]
#[repr(transparent)]
#[rustc_layout_scalar_valid_range_start(1)]
Expand Down Expand Up @@ -82,8 +82,8 @@ impl<T: Sized> NonNull<T> {
///
/// For the mutable counterpart see [`as_uninit_mut`].
///
/// [`as_ref`]: #method.as_ref
/// [`as_uninit_mut`]: #method.as_uninit_mut
/// [`as_ref`]: NonNull::as_ref
/// [`as_uninit_mut`]: NonNull::as_uninit_mut
///
/// # Safety
///
Expand Down Expand Up @@ -114,8 +114,8 @@ impl<T: Sized> NonNull<T> {
///
/// For the shared counterpart see [`as_uninit_ref`].
///
/// [`as_mut`]: #method.as_mut
/// [`as_uninit_ref`]: #method.as_uninit_ref
/// [`as_mut`]: NonNull::as_mut
/// [`as_uninit_ref`]: NonNull::as_uninit_ref
///
/// # Safety
///
Expand Down Expand Up @@ -181,8 +181,8 @@ impl<T: ?Sized> NonNull<T> {
///
/// For the mutable counterpart see [`as_mut`].
///
/// [`as_uninit_ref`]: #method.as_uninit_ref
/// [`as_mut`]: #method.as_mut
/// [`as_uninit_ref`]: NonNull::as_uninit_ref
/// [`as_mut`]: NonNull::as_mut
///
/// # Safety
///
Expand Down Expand Up @@ -217,8 +217,8 @@ impl<T: ?Sized> NonNull<T> {
///
/// For the shared counterpart see [`as_ref`].
///
/// [`as_uninit_mut`]: #method.as_uninit_mut
/// [`as_ref`]: #method.as_ref
/// [`as_uninit_mut`]: NonNull::as_uninit_mut
/// [`as_ref`]: NonNull::as_ref
///
/// # Safety
///
Expand Down Expand Up @@ -266,8 +266,6 @@ impl<T> NonNull<[T]> {
/// This function is safe, but dereferencing the return value is unsafe.
/// See the documentation of [`slice::from_raw_parts`] for slice safety requirements.
///
/// [`slice::from_raw_parts`]: ../../std/slice/fn.from_raw_parts.html
///
/// # Examples
///
/// ```rust
Expand Down Expand Up @@ -357,8 +355,8 @@ impl<T> NonNull<[T]> {
///
/// For the mutable counterpart see [`as_uninit_slice_mut`].
///
/// [`as_ref`]: #method.as_ref
/// [`as_uninit_slice_mut`]: #method.as_uninit_slice_mut
/// [`as_ref`]: NonNull::as_ref
/// [`as_uninit_slice_mut`]: NonNull::as_uninit_slice_mut
///
/// # Safety
///
Expand Down Expand Up @@ -386,10 +384,9 @@ impl<T> NonNull<[T]> {
///
/// This applies even if the result of this method is unused!
///
/// See also [`slice::from_raw_parts`][].
/// See also [`slice::from_raw_parts`].
///
/// [valid]: crate::ptr#safety
/// [`NonNull::dangling()`]: NonNull::dangling
/// [`pointer::offset`]: ../../std/primitive.pointer.html#method.offset
#[inline]
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
Expand All @@ -403,8 +400,8 @@ impl<T> NonNull<[T]> {
///
/// For the shared counterpart see [`as_uninit_slice`].
///
/// [`as_mut`]: #method.as_mut
/// [`as_uninit_slice`]: #method.as_uninit_slice
/// [`as_mut`]: NonNull::as_mut
/// [`as_uninit_slice`]: NonNull::as_uninit_slice
///
/// # Safety
///
Expand Down Expand Up @@ -432,10 +429,9 @@ impl<T> NonNull<[T]> {
///
/// This applies even if the result of this method is unused!
///
/// See also [`slice::from_raw_parts_mut`][].
/// See also [`slice::from_raw_parts_mut`].
///
/// [valid]: crate::ptr#safety
/// [`NonNull::dangling()`]: NonNull::dangling
/// [`pointer::offset`]: ../../std/primitive.pointer.html#method.offset
///
/// # Examples
Expand Down
17 changes: 14 additions & 3 deletions library/panic_abort/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#![feature(panic_runtime)]
#![feature(staged_api)]
#![feature(rustc_attrs)]
#![feature(llvm_asm)]
#![feature(asm)]

use core::any::Any;

Expand Down Expand Up @@ -47,7 +47,7 @@ pub unsafe extern "C" fn __rust_start_panic(_payload: usize) -> u32 {
}
__rust_abort();
}
} else if #[cfg(all(windows, any(target_arch = "x86", target_arch = "x86_64")))] {
} else if #[cfg(windows)] {
// On Windows, use the processor-specific __fastfail mechanism. In Windows 8
// and later, this will terminate the process immediately without running any
// in-process exception handlers. In earlier versions of Windows, this
Expand All @@ -59,7 +59,18 @@ pub unsafe extern "C" fn __rust_start_panic(_payload: usize) -> u32 {
//
// Note: this is the same implementation as in libstd's `abort_internal`
unsafe fn abort() -> ! {
llvm_asm!("int $$0x29" :: "{ecx}"(7) ::: volatile); // 7 is FAST_FAIL_FATAL_APP_EXIT
const FAST_FAIL_FATAL_APP_EXIT: usize = 7;
cfg_if::cfg_if! {
if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
asm!("int $$0x29", in("ecx") FAST_FAIL_FATAL_APP_EXIT);
} else if #[cfg(target_arch = "arm")] {
asm!(".inst 0xDEFB", in("r0") FAST_FAIL_FATAL_APP_EXIT);
} else if #[cfg(target_arch = "aarch64")] {
asm!("brk 0xF003", in("x0") FAST_FAIL_FATAL_APP_EXIT);
} else {
core::intrinsics::abort();
}
}
core::intrinsics::unreachable();
}
} else {
Expand Down
16 changes: 13 additions & 3 deletions library/std/src/sys/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,20 @@ pub fn dur2timeout(dur: Duration) -> c::DWORD {
/// that function for more information on `__fastfail`
#[allow(unreachable_code)]
pub fn abort_internal() -> ! {
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
const FAST_FAIL_FATAL_APP_EXIT: usize = 7;
unsafe {
llvm_asm!("int $$0x29" :: "{ecx}"(7) ::: volatile); // 7 is FAST_FAIL_FATAL_APP_EXIT
crate::intrinsics::unreachable();
cfg_if::cfg_if! {
if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
asm!("int $$0x29", in("ecx") FAST_FAIL_FATAL_APP_EXIT);
crate::intrinsics::unreachable();
} else if #[cfg(target_arch = "arm")] {
asm!(".inst 0xDEFB", in("r0") FAST_FAIL_FATAL_APP_EXIT);
crate::intrinsics::unreachable();
} else if #[cfg(target_arch = "aarch64")] {
asm!("brk 0xF003", in("x0") FAST_FAIL_FATAL_APP_EXIT);
crate::intrinsics::unreachable();
}
}
}
crate::intrinsics::abort();
}
1 change: 1 addition & 0 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ impl Step for DebuggerScripts {

cp_debugger_script("lldb_lookup.py");
cp_debugger_script("lldb_providers.py");
cp_debugger_script("lldb_commands")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/doc/unstable-book/src/compiler-flags/tls-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ The TLS data must not be in a library loaded after startup (via `dlopen`).
but not in a shared library, and is accessed only from that executable.

`rustc` and LLVM may use a more optimized model than specified if they know that we are producing
and executable rather than a library, or that the `static` item is private enough.
an executable rather than a library, or that the `static` item is private enough.
1 change: 0 additions & 1 deletion src/etc/lldb_commands
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\"
type synthetic add -l lldb_lookup.synthetic_lookup -x \".*\" --category Rust
type summary add -F lldb_lookup.summary_lookup -e -x -h \"^(alloc::([a-z_]+::)+)String$\" --category Rust
type summary add -F lldb_lookup.summary_lookup -e -x -h \"^&str$\" --category Rust
Expand Down
5 changes: 4 additions & 1 deletion src/etc/rust-lldb
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ EOF
fi
fi

script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\""
commands_file="$RUSTC_SYSROOT/lib/rustlib/etc/lldb_commands"

# Call LLDB with the commands added to the argument list
exec "$lldb" --source-before-file ./lldb_commands "$@"
exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
Loading