Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
8a83c8f
Improve suggestion for tuple struct pattern matching errors.
reese Jan 21, 2021
f165f49
Slight perf improvement on char::to_ascii_lowercase
gilescope Feb 6, 2021
f30c51a
Pulling out constant.
gilescope Feb 6, 2021
a0f9d4b
Enable smart punctuation
camelid Sep 15, 2020
f1581ed
Test that code does not get smart-punctuated
camelid Feb 8, 2021
e4b83fc
Document smart punctuation
camelid Feb 8, 2021
cadcf5e
Unify way to flip 6th bit. (Same assembly generated)
gilescope Feb 8, 2021
0a34521
Fix `@has` checks "no closing quotation" error
camelid Feb 8, 2021
1b29b29
Update Markdown unit tests
camelid Feb 9, 2021
0060c91
Make WASI's `hard_link` behavior match other platforms.
sunfishcode Feb 11, 2021
daa55ac
Slightly more explicit
gilescope Feb 12, 2021
9d29793
Improve design of `assert_len`
dylni Jan 18, 2021
cb647f3
Fix possible soundness issue in `ensure_subset_of`
dylni Jan 18, 2021
f6111a2
Remove unnecessary documentation page
dylni Jan 18, 2021
5d519ea
Rename `Range::ensure_subset_of` to `slice::range`
dylni Feb 2, 2021
fe4fe19
Update new usage of `assert_len`
dylni Feb 13, 2021
eace240
use option<PlaceRef<'tcx>> to clean up mir code a little
henryboisdequin Feb 14, 2021
7879099
Clarify error message and remove pretty printing in help suggestions.
reese Feb 14, 2021
33d8b04
Move const def nearer usage.
gilescope Feb 14, 2021
5ef2025
add diagnostic items
anall Feb 15, 2021
c6bb628
requested/proposed changes
anall Feb 15, 2021
30c5125
update formating
henryboisdequin Feb 16, 2021
67fcaaa
a few more diagnostic items
anall Feb 16, 2021
5ec4b06
make `visit_projection` take a `PlaceRef`
henryboisdequin Feb 16, 2021
eeb5552
Remove query parameters when leaving search results
GuillaumeGomez Feb 17, 2021
8ddd846
nhwn: make treat_err_as_bug Option<NonZeroUsize>
nhwn Feb 18, 2021
48b5c09
add s390x-unknown-linux-musl target
kaniini Feb 16, 2021
597118b
add s390x-unknown-linux-musl target to platform support
kaniini Feb 16, 2021
62ee3ec
remove checkboxes from s390x-unknown-linux-musl triplet
kaniini Feb 19, 2021
1abcdfe
x.py fmt
sunfishcode Feb 19, 2021
a9c6188
make `super_projection` take a `PlaceRef`
henryboisdequin Feb 20, 2021
d8540ae
Fix suggestion span and move suggestions into new subwindow.
reese Feb 20, 2021
796ce9f
Suggest `return`ing tail expressions that match return type
estebank Feb 4, 2021
020edd9
reword `;` suggestions to have consistent wording
estebank Feb 4, 2021
d669882
Do not suggest `;` if expression is side effect free
estebank Feb 5, 2021
86b3f3f
tidy
estebank Feb 5, 2021
fc6c19e
fix rebase
estebank Feb 22, 2021
7bc5016
Avoid `cfg_if` in `std::os`
jonas-schievink Feb 10, 2021
1c2a949
Rollup merge of #79423 - camelid:smart-punct, r=jyn514
Dylan-DPC Feb 23, 2021
72e6d51
Rollup merge of #81154 - dylni:improve-design-of-assert-len, r=KodrAus
Dylan-DPC Feb 23, 2021
8e51bd4
Rollup merge of #81235 - reese:rw-tuple-diagnostics, r=estebank
Dylan-DPC Feb 23, 2021
5d90e89
Rollup merge of #81769 - estebank:tail-expr-as-potential-return, r=lcnr
Dylan-DPC Feb 23, 2021
4af965e
Rollup merge of #81837 - gilescope:to_ascii_speedups, r=dtolnay
Dylan-DPC Feb 23, 2021
c3de8ab
Rollup merge of #81969 - jonas-schievink:no-cfg-if, r=Mark-Simulacrum
Dylan-DPC Feb 23, 2021
7b9ef2f
Rollup merge of #81984 - sunfishcode:wasi-link, r=alexcrichton
Dylan-DPC Feb 23, 2021
cc07061
Rollup merge of #82091 - henryboisdequin:use-place-ref-more, r=RalfJung
Dylan-DPC Feb 23, 2021
b8d4354
Rollup merge of #82128 - anall:feature/add_diagnostic_items, r=davidtwco
Dylan-DPC Feb 23, 2021
8979fd4
Rollup merge of #82166 - kaniini:s390x-musl-target, r=nagisa
Dylan-DPC Feb 23, 2021
8541435
Rollup merge of #82234 - GuillaumeGomez:remove-query-param-on-esc, r=…
Dylan-DPC Feb 23, 2021
0e5bca5
Rollup merge of #82255 - nhwn:nonzero-err-as-bug, r=davidtwco
Dylan-DPC Feb 23, 2021
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
Prev Previous commit
Next Next commit
Unify way to flip 6th bit. (Same assembly generated)
  • Loading branch information
gilescope committed Feb 8, 2021
commit cadcf5ed990dc02ad86cbb9f31423959a5517f50
6 changes: 4 additions & 2 deletions library/core/benches/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ macro_rules! benches {
use test::black_box;
use test::Bencher;

const ASCII_CASE_MASK: u8 = 0b0010_0000;

benches! {
fn case00_alloc_only(_bytes: &mut [u8]) {}

Expand Down Expand Up @@ -204,7 +206,7 @@ benches! {
}
}
for byte in bytes {
*byte &= !((is_ascii_lowercase(*byte) as u8) << 5)
*byte &= !((is_ascii_lowercase(*byte) as u8) * ASCII_CASE_MASK)
}
}

Expand All @@ -216,7 +218,7 @@ benches! {
}
}
for byte in bytes {
*byte -= (is_ascii_lowercase(*byte) as u8) << 5
*byte -= (is_ascii_lowercase(*byte) as u8) * ASCII_CASE_MASK
}
}

Expand Down
5 changes: 1 addition & 4 deletions library/core/src/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
use crate::slice;
use crate::str::from_utf8_unchecked_mut;
use crate::unicode::printable::is_printable;
use crate::unicode::{self, conversions};
use crate::unicode::{self, conversions, ASCII_CASE_MASK};

use super::*;

/// If 6th bit set ascii is upper case.
const ASCII_CASE_MASK: u8 = 0b10_0000u8;

#[lang = "char"]
impl char {
/// The highest valid code point a `char` can have.
Expand Down
5 changes: 3 additions & 2 deletions library/core/src/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use crate::intrinsics;
use crate::mem;
use crate::str::FromStr;
use crate::unicode::ASCII_CASE_MASK;

// Used because the `?` operator is not allowed in a const context.
macro_rules! try_opt {
Expand Down Expand Up @@ -195,7 +196,7 @@ impl u8 {
#[inline]
pub fn to_ascii_uppercase(&self) -> u8 {
// Unset the fifth bit if this is a lowercase letter
*self & !((self.is_ascii_lowercase() as u8) << 5)
*self & !((self.is_ascii_lowercase() as u8) * ASCII_CASE_MASK)
}

/// Makes a copy of the value in its ASCII lower case equivalent.
Expand All @@ -218,7 +219,7 @@ impl u8 {
#[inline]
pub fn to_ascii_lowercase(&self) -> u8 {
// Set the fifth bit if this is an uppercase letter
*self | ((self.is_ascii_uppercase() as u8) << 5)
*self | (self.is_ascii_uppercase() as u8 * ASCII_CASE_MASK)
}

/// Checks that two values are an ASCII case-insensitive match.
Expand Down
3 changes: 3 additions & 0 deletions library/core/src/unicode/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ mod unicode_data;
#[stable(feature = "unicode_version", since = "1.45.0")]
pub const UNICODE_VERSION: (u8, u8, u8) = unicode_data::UNICODE_VERSION;

/// If 6th bit set ascii is upper case.
pub(crate) const ASCII_CASE_MASK: u8 = 0b0010_0000;

// For use in liballoc, not re-exported in libstd.
pub use unicode_data::{
case_ignorable::lookup as Case_Ignorable, cased::lookup as Cased, conversions,
Expand Down