Skip to content

Commit 0ebedd3

Browse files
committed
line-wrap comments, typos
1 parent 4e481c6 commit 0ebedd3

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,11 @@ impl<'a> IntoIterator for LLVMFeature<'a> {
211211
/// To find a list of LLVM's names, see llvm-project/llvm/lib/Target/{ARCH}/*.td
212212
/// where `{ARCH}` is the architecture name. Look for instances of `SubtargetFeature`.
213213
///
214-
/// Check the current rustc fork of LLVM in the repo at <https://github.com/rust-lang/llvm-project/>.
215-
/// The commit in use can be found via the `llvm-project` submodule in
216-
/// <https://github.com/rust-lang/rust/tree/master/src> Though note that Rust can also be build with
217-
/// an external precompiled version of LLVM which might lead to failures if the oldest tested /
218-
/// supported LLVM version doesn't yet support the relevant intrinsics.
214+
/// Check the current rustc fork of LLVM in the repo at
215+
/// <https://github.com/rust-lang/llvm-project/>. The commit in use can be found via the
216+
/// `llvm-project` submodule in <https://github.com/rust-lang/rust/tree/master/src> Though note that
217+
/// Rust can also be build with an external precompiled version of LLVM which might lead to failures
218+
/// if the oldest tested / supported LLVM version doesn't yet support the relevant intrinsics.
219219
pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFeature<'a>> {
220220
let arch = if sess.target.arch == "x86_64" {
221221
"x86"

compiler/rustc_codegen_ssa/src/target_features.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,9 @@ fn parse_rust_feature_flag<'a>(
178178
if let Some(base_feature) = feature.strip_prefix('+') {
179179
callback(base_feature, sess.target.implied_target_features(base_feature), true)
180180
} else if let Some(base_feature) = feature.strip_prefix('-') {
181-
// If `f1` implies `f2`, then `!f2` implies `!f1` -- this is standard logical contraposition.
182-
// So we have to find all the reverse implications of `base_feature` and disable them, too.
181+
// If `f1` implies `f2`, then `!f2` implies `!f1` -- this is standard logical
182+
// contraposition. So we have to find all the reverse implications of `base_feature` and
183+
// disable them, too.
183184

184185
let inverse_implied_features = inverse_implied_features.get_or_insert_with(|| {
185186
let mut set: FxHashMap<&str, FxHashSet<&str>> = FxHashMap::default();
@@ -191,7 +192,7 @@ fn parse_rust_feature_flag<'a>(
191192
set
192193
});
193194

194-
// Inverse mplied target features have their own inverse implied target features, so we
195+
// Inverse implied target features have their own inverse implied target features, so we
195196
// traverse the map until there are no more features to add.
196197
let mut features = FxHashSet::default();
197198
let mut new_features = vec![base_feature];
@@ -214,8 +215,8 @@ fn parse_rust_feature_flag<'a>(
214215
/// to populate `sess.unstable_target_features` and `sess.target_features` (these are the first and
215216
/// 2nd component of the return value, respectively).
216217
///
217-
/// `target_base_has_feature` should check whether the given feature (a Rust feature name!) is enabled
218-
/// in the "base" target machine, i.e., without applying `-Ctarget-feature`.
218+
/// `target_base_has_feature` should check whether the given feature (a Rust feature name!) is
219+
/// enabled in the "base" target machine, i.e., without applying `-Ctarget-feature`.
219220
///
220221
/// We do not have to worry about RUSTC_SPECIFIC_FEATURES here, those are handled elsewhere.
221222
pub fn cfg_target_feature(
@@ -339,8 +340,8 @@ pub fn flag_to_backend_features<'a, const N: usize>(
339340
let feature_state = known_features.iter().find(|&&(v, _, _)| v == base_feature);
340341
match feature_state {
341342
None => {
342-
// This is definitely not a valid Rust feature name. Maybe it is a backend feature name?
343-
// If so, give a better error message.
343+
// This is definitely not a valid Rust feature name. Maybe it is a backend
344+
// feature name? If so, give a better error message.
344345
let rust_feature =
345346
known_features.iter().find_map(|&(rust_feature, _, _)| {
346347
let backend_features = to_backend_features(rust_feature);
@@ -432,7 +433,8 @@ pub(crate) fn provide(providers: &mut Providers) {
432433
Stability::Unstable { .. } | Stability::Forbidden { .. },
433434
)
434435
| (Stability::Forbidden { .. }, Stability::Forbidden { .. }) => {
435-
// The stability in the entry is at least as good as the new one, just keep it.
436+
// The stability in the entry is at least as good as the new
437+
// one, just keep it.
436438
}
437439
_ => {
438440
// Overwrite stabilite.

0 commit comments

Comments
 (0)