Skip to content

Commit 4452446

Browse files
committed
fix more typos found by codespell.
1 parent b298607 commit 4452446

File tree

69 files changed

+89
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+89
-89
lines changed

RELEASES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Libraries
2929
- [Copied `AsciiExt` methods onto `char`][46077]
3030
- [Remove `T: Sized` requirement on `ptr::is_null()`][46094]
3131
- [impl `From<RecvError>` for `{TryRecvError, RecvTimeoutError}`][45506]
32-
- [Optimised `f32::{min, max}` to generate more efficent x86 assembly][47080]
32+
- [Optimised `f32::{min, max}` to generate more efficient x86 assembly][47080]
3333
- [`[u8]::contains` now uses memchr which provides a 3x speed improvement][46713]
3434

3535
Stabilized APIs

config.toml.example

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@
151151
# default.
152152
#extended = false
153153

154-
# Installs choosen set of extended tools if enables. By default builds all.
155-
# If choosen tool failed to build the installation fails.
154+
# Installs chosen set of extended tools if enables. By default builds all.
155+
# If chosen tool failed to build the installation fails.
156156
#tools = ["cargo", "rls", "rustfmt", "analysis", "src"]
157157

158158
# Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose

src/bootstrap/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ impl Step for Compiletest {
935935
}
936936
}
937937
if suite == "run-make" && !build.config.llvm_enabled {
938-
println!("Ignoring run-make test suite as they generally dont work without LLVM");
938+
println!("Ignoring run-make test suite as they generally don't work without LLVM");
939939
return;
940940
}
941941

src/librustc/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,7 @@ is a function pointer, which is not zero-sized.
18911891
This pattern should be rewritten. There are a few possible ways to do this:
18921892
18931893
- change the original fn declaration to match the expected signature,
1894-
and do the cast in the fn body (the prefered option)
1894+
and do the cast in the fn body (the preferred option)
18951895
- cast the fn item fo a fn pointer before calling transmute, as shown here:
18961896
18971897
```

src/librustc/hir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ impl Generics {
543543
}
544544

545545
/// Synthetic Type Parameters are converted to an other form during lowering, this allows
546-
/// to track the original form they had. Usefull for error messages.
546+
/// to track the original form they had. Useful for error messages.
547547
#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
548548
pub enum SyntheticTyParamKind {
549549
ImplTrait

src/librustc/infer/error_reporting/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
734734
}
735735
}
736736

737-
// When finding T != &T, hightlight only the borrow
737+
// When finding T != &T, highlight only the borrow
738738
(&ty::TyRef(r1, ref tnm1), _) if equals(&tnm1.ty, &t2) => {
739739
let mut values = (DiagnosticStyledString::new(), DiagnosticStyledString::new());
740740
push_ty_ref(&r1, tnm1, &mut values.0);
@@ -946,7 +946,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
946946
let type_param = generics.type_param(param, self.tcx);
947947
let hir = &self.tcx.hir;
948948
hir.as_local_node_id(type_param.def_id).map(|id| {
949-
// Get the `hir::TyParam` to verify wether it already has any bounds.
949+
// Get the `hir::TyParam` to verify whether it already has any bounds.
950950
// We do this to avoid suggesting code that ends up as `T: 'a'b`,
951951
// instead we suggest `T: 'a + 'b` in that case.
952952
let has_lifetimes = if let hir_map::NodeTyParam(ref p) = hir.get(id) {

src/librustc/infer/outlives/obligations.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
106106
/// done (or else an assert will fire).
107107
///
108108
/// See the `region_obligations` field of `InferCtxt` for some
109-
/// comments about how this funtion fits into the overall expected
109+
/// comments about how this function fits into the overall expected
110110
/// flow of the the inferencer. The key point is that it is
111111
/// invoked after all type-inference variables have been bound --
112112
/// towards the end of regionck. This also ensures that the

src/librustc/infer/region_constraints/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The constraints are always of one of three possible forms:
1919
a subregion of Rj
2020
- `ConstrainRegSubVar(R, Ri)` states that the concrete region R (which
2121
must not be a variable) must be a subregion of the variable Ri
22-
- `ConstrainVarSubReg(Ri, R)` states the variable Ri shoudl be less
22+
- `ConstrainVarSubReg(Ri, R)` states the variable Ri should be less
2323
than the concrete region R. This is kind of deprecated and ought to
2424
be replaced with a verify (they essentially play the same role).
2525

src/librustc/middle/region.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ fn resolve_block<'a, 'tcx>(visitor: &mut RegionResolutionVisitor<'a, 'tcx>, blk:
886886
//
887887
// Each of the statements within the block is a terminating
888888
// scope, and thus a temporary (e.g. the result of calling
889-
// `bar()` in the initalizer expression for `let inner = ...;`)
889+
// `bar()` in the initializer expression for `let inner = ...;`)
890890
// will be cleaned up immediately after its corresponding
891891
// statement (i.e. `let inner = ...;`) executes.
892892
//

src/librustc/mir/interpret/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub struct GlobalId<'tcx> {
5656
////////////////////////////////////////////////////////////////////////////////
5757

5858
pub trait PointerArithmetic: layout::HasDataLayout {
59-
// These are not supposed to be overriden.
59+
// These are not supposed to be overridden.
6060

6161
//// Trunace the given value to the pointer size; also return whether there was an overflow
6262
fn truncate_to_ptr(self, val: u128) -> (u64, bool) {

src/librustc/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1950,7 +1950,7 @@ pub struct GeneratorLayout<'tcx> {
19501950
/// ```
19511951
///
19521952
/// here, there is one unique free region (`'a`) but it appears
1953-
/// twice. We would "renumber" each occurence to a unique vid, as follows:
1953+
/// twice. We would "renumber" each occurrence to a unique vid, as follows:
19541954
///
19551955
/// ```text
19561956
/// ClosureSubsts = [

src/librustc/traits/coherence.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ pub fn orphan_check<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
277277
/// is bad, because the only local type with `T` as a subtree is
278278
/// `LocalType<T>`, and `Vec<->` is between it and the type parameter.
279279
/// - similarly, `FundamentalPair<LocalType<T>, T>` is bad, because
280-
/// the second occurence of `T` is not a subtree of *any* local type.
280+
/// the second occurrence of `T` is not a subtree of *any* local type.
281281
/// - however, `LocalType<Vec<T>>` is OK, because `T` is a subtree of
282282
/// `LocalType<Vec<T>>`, which is local and has no types between it and
283283
/// the type parameter.

src/librustc/traits/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ pub fn fully_normalize<'a, 'gcx, 'tcx, T>(infcx: &InferCtxt<'a, 'gcx, 'tcx>,
621621
// FIXME (@jroesch) ISSUE 26721
622622
// I'm not sure if this is a bug or not, needs further investigation.
623623
// It appears that by reusing the fulfillment_cx here we incur more
624-
// obligations and later trip an asssertion on regionck.rs line 337.
624+
// obligations and later trip an assertion on regionck.rs line 337.
625625
//
626626
// The two possibilities I see is:
627627
// - normalization is not actually fully happening and we

src/librustc/ty/layout.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2059,7 +2059,7 @@ impl<'a, 'tcx> LayoutOf<Ty<'tcx>> for LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>> {
20592059
// can however trigger recursive invocations of `layout_of`.
20602060
// Therefore, we execute it *after* the main query has
20612061
// completed, to avoid problems around recursive structures
2062-
// and the like. (Admitedly, I wasn't able to reproduce a problem
2062+
// and the like. (Admittedly, I wasn't able to reproduce a problem
20632063
// here, but it seems like the right thing to do. -nmatsakis)
20642064
self.record_layout_for_printing(layout);
20652065

@@ -2085,7 +2085,7 @@ impl<'a, 'tcx> LayoutOf<Ty<'tcx>> for LayoutCx<'tcx, ty::maps::TyCtxtAt<'a, 'tcx
20852085
// can however trigger recursive invocations of `layout_of`.
20862086
// Therefore, we execute it *after* the main query has
20872087
// completed, to avoid problems around recursive structures
2088-
// and the like. (Admitedly, I wasn't able to reproduce a problem
2088+
// and the like. (Admittedly, I wasn't able to reproduce a problem
20892089
// here, but it seems like the right thing to do. -nmatsakis)
20902090
let cx = LayoutCx {
20912091
tcx: *self.tcx,

src/librustc_apfloat/tests/ieee.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2201,12 +2201,12 @@ fn is_finite_non_zero() {
22012201
assert!(!Single::ZERO.is_finite_non_zero());
22022202
assert!(!(-Single::ZERO).is_finite_non_zero());
22032203

2204-
// Test +/- qNaN. +/- dont mean anything with qNaN but paranoia can't hurt in
2204+
// Test +/- qNaN. +/- don't mean anything with qNaN but paranoia can't hurt in
22052205
// this instance.
22062206
assert!(!Single::NAN.is_finite_non_zero());
22072207
assert!(!(-Single::NAN).is_finite_non_zero());
22082208

2209-
// Test +/- sNaN. +/- dont mean anything with sNaN but paranoia can't hurt in
2209+
// Test +/- sNaN. +/- don't mean anything with sNaN but paranoia can't hurt in
22102210
// this instance.
22112211
assert!(!Single::snan(None).is_finite_non_zero());
22122212
assert!(!(-Single::snan(None)).is_finite_non_zero());

src/librustc_borrowck/borrowck/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
11111111

11121112
/// Given a type, if it is an immutable reference, return a suggestion to make it mutable
11131113
fn suggest_mut_for_immutable(&self, pty: &hir::Ty, is_implicit_self: bool) -> Option<String> {
1114-
// Check wether the argument is an immutable reference
1114+
// Check whether the argument is an immutable reference
11151115
debug!("suggest_mut_for_immutable({:?}, {:?})", pty, is_implicit_self);
11161116
if let hir::TyRptr(lifetime, hir::MutTy {
11171117
mutbl: hir::Mutability::MutImmutable,

src/librustc_const_eval/_match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ pub fn is_useful<'p, 'a: 'p, 'tcx: 'a>(cx: &mut MatchCheckCtxt<'a, 'tcx>,
607607
// be able to observe whether the types of the struct's fields are
608608
// inhabited.
609609
//
610-
// If the field is truely inaccessible, then all the patterns
610+
// If the field is truly inaccessible, then all the patterns
611611
// matching against it must be wildcard patterns, so its type
612612
// does not matter.
613613
//

src/librustc_data_structures/indexed_vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ macro_rules! newtype_index {
204204
$($tokens)*);
205205
);
206206

207-
// The case where no derives are added, but encodable is overriden. Don't
207+
// The case where no derives are added, but encodable is overridden. Don't
208208
// derive serialization traits
209209
(@pub [$($pub:tt)*]
210210
@type [$type:ident]

src/librustc_mir/borrow_check/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
117117
for move_error in move_errors {
118118
let (span, kind): (Span, IllegalMoveOriginKind) = match move_error {
119119
MoveError::UnionMove { .. } => {
120-
unimplemented!("dont know how to report union move errors yet.")
120+
unimplemented!("don't know how to report union move errors yet.")
121121
}
122122
MoveError::IllegalMove {
123123
cannot_move_out_of: o,
@@ -1424,7 +1424,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
14241424
/// tracked in the MoveData.
14251425
///
14261426
/// An Err result includes a tag indicated why the search failed.
1427-
/// Currenly this can only occur if the place is built off of a
1427+
/// Currently this can only occur if the place is built off of a
14281428
/// static variable, as we do not track those in the MoveData.
14291429
fn move_path_closest_to(
14301430
&mut self,
@@ -1439,7 +1439,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
14391439
}
14401440
match *last_prefix {
14411441
Place::Local(_) => panic!("should have move path for every Local"),
1442-
Place::Projection(_) => panic!("PrefixSet::All meant dont stop for Projection"),
1442+
Place::Projection(_) => panic!("PrefixSet::All meant don't stop for Projection"),
14431443
Place::Static(_) => return Err(NoMovePathFound::ReachedStatic),
14441444
}
14451445
}
@@ -1484,7 +1484,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
14841484
{ }
14851485

14861486
ProjectionElem::Subslice { .. } => {
1487-
panic!("we dont allow assignments to subslices, context: {:?}",
1487+
panic!("we don't allow assignments to subslices, context: {:?}",
14881488
context);
14891489
}
14901490

src/librustc_mir/borrow_check/nll/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ fn for_each_region_constraint(
278278

279279
/// Right now, we piggy back on the `ReVar` to store our NLL inference
280280
/// regions. These are indexed with `RegionVid`. This method will
281-
/// assert that the region is a `ReVar` and extract its interal index.
281+
/// assert that the region is a `ReVar` and extract its internal index.
282282
/// This is reasonable because in our MIR we replace all universal regions
283283
/// with inference variables.
284284
pub trait ToRegionVid {

src/librustc_mir/borrow_check/nll/region_infer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
964964
debug!("check_universal_region: fr_minus={:?}", fr_minus);
965965

966966
// Grow `shorter_fr` until we find a non-local
967-
// regon. (We always will.) We'll call that
967+
// region. (We always will.) We'll call that
968968
// `shorter_fr+` -- it's ever so slightly larger than
969969
// `fr`.
970970
let shorter_fr_plus = self.universal_regions.non_local_upper_bound(shorter_fr);

src/librustc_mir/borrow_check/nll/region_infer/values.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ pub(super) enum RegionElement {
150150
/// A point in the control-flow graph.
151151
Location(Location),
152152

153-
/// An in-scope, universally quantified region (e.g., a liftime parameter).
153+
/// An in-scope, universally quantified region (e.g., a lifetime parameter).
154154
UniversalRegion(RegionVid),
155155
}
156156

src/librustc_mir/build/matches/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Code related to match expresions. These are sufficiently complex
11+
//! Code related to match expressions. These are sufficiently complex
1212
//! to warrant their own module and submodules. :) This main module
1313
//! includes the high-level algorithm, the submodules contain the
1414
//! details.

src/librustc_mir/dataflow/impls/borrows.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ pub struct Borrows<'a, 'gcx: 'tcx, 'tcx: 'a> {
8080
/// tracking (phased) borrows. It computes where a borrow is reserved;
8181
/// i.e. where it can reach in the control flow starting from its
8282
/// initial `assigned = &'rgn borrowed` statement, and ending
83-
/// whereever `'rgn` itself ends.
83+
/// wherever `'rgn` itself ends.
8484
pub(crate) struct Reservations<'a, 'gcx: 'tcx, 'tcx: 'a>(pub(crate) Borrows<'a, 'gcx, 'tcx>);
8585

8686
/// The `ActiveBorrows` analysis is the second of the two flow
8787
/// analyses tracking (phased) borrows. It computes where any given
8888
/// borrow `&assigned = &'rgn borrowed` is *active*, which starts at
8989
/// the first use of `assigned` after the reservation has started, and
90-
/// ends whereever `'rgn` itself ends.
90+
/// ends wherever `'rgn` itself ends.
9191
pub(crate) struct ActiveBorrows<'a, 'gcx: 'tcx, 'tcx: 'a>(pub(crate) Borrows<'a, 'gcx, 'tcx>);
9292

9393
impl<'a, 'gcx, 'tcx> Reservations<'a, 'gcx, 'tcx> {

src/librustc_mir/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ with `#[derive(Clone)]`.
365365
Some types have no ownership semantics at all and are trivial to duplicate. An
366366
example is `i32` and the other number types. We don't have to call `.clone()` to
367367
clone them, because they are marked `Copy` in addition to `Clone`. Implicit
368-
cloning is more convienient in this case. We can mark our own types `Copy` if
368+
cloning is more convenient in this case. We can mark our own types `Copy` if
369369
all their members also are marked `Copy`.
370370
371371
In the example below, we implement a `Point` type. Because it only stores two

src/librustc_mir/interpret/eval_context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub struct Frame<'tcx> {
8484
/// return).
8585
pub block: mir::BasicBlock,
8686

87-
/// The index of the currently evaluated statment.
87+
/// The index of the currently evaluated statement.
8888
pub stmt: usize,
8989
}
9090

src/librustc_mir/monomorphize/item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub enum InstantiationMode {
6868
/// however, our local copy may conflict with other crates also
6969
/// inlining the same function.
7070
///
71-
/// This flag indicates that this situation is occuring, and informs
71+
/// This flag indicates that this situation is occurring, and informs
7272
/// symbol name calculation that some extra mangling is needed to
7373
/// avoid conflicts. Note that this may eventually go away entirely if
7474
/// ThinLTO enables us to *always* have a globally shared instance of a

src/librustc_privacy/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypePrivacyVisitor<'a, 'tcx> {
781781
// Additionally, until better reachability analysis for macros 2.0 is available,
782782
// we prohibit access to private statics from other crates, this allows to give
783783
// more code internal visibility at link time. (Access to private functions
784-
// is already prohibited by type privacy for funciton types.)
784+
// is already prohibited by type privacy for function types.)
785785
fn visit_qpath(&mut self, qpath: &'tcx hir::QPath, id: ast::NodeId, span: Span) {
786786
let def = match *qpath {
787787
hir::QPath::Resolved(_, ref path) => match path.def {

src/librustc_resolve/check_unused.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// `use` directives.
1818
//
1919
// Unused trait imports can't be checked until the method resolution. We save
20-
// candidates here, and do the acutal check in librustc_typeck/check_unused.rs.
20+
// candidates here, and do the actual check in librustc_typeck/check_unused.rs.
2121

2222
use std::ops::{Deref, DerefMut};
2323

src/librustc_resolve/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ impl<'a> Resolver<'a> {
14401440
/// Rustdoc uses this to resolve things in a recoverable way. ResolutionError<'a>
14411441
/// isn't something that can be returned because it can't be made to live that long,
14421442
/// and also it's a private type. Fortunately rustdoc doesn't need to know the error,
1443-
/// just that an error occured.
1443+
/// just that an error occurred.
14441444
pub fn resolve_str_path_error(&mut self, span: Span, path_str: &str, is_value: bool)
14451445
-> Result<hir::Path, ()> {
14461446
use std::iter;

src/librustc_resolve/resolve_imports.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ impl<'a> Resolver<'a> {
186186
}
187187

188188
let check_usable = |this: &mut Self, binding: &'a NameBinding<'a>| {
189-
// `extern crate` are always usable for backwards compatability, see issue #37020.
189+
// `extern crate` are always usable for backwards compatibility, see issue #37020.
190190
let usable = this.is_accessible(binding.vis) || binding.is_extern_crate();
191191
if usable { Ok(binding) } else { Err(Determined) }
192192
};

src/librustc_trans/back/lto.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl LtoModuleTranslation {
8484
}
8585
}
8686

87-
/// A "guage" of how costly it is to optimize this module, used to sort
87+
/// A "gauge" of how costly it is to optimize this module, used to sort
8888
/// biggest modules first.
8989
pub fn cost(&self) -> u64 {
9090
match *self {
@@ -726,7 +726,7 @@ impl ThinModule {
726726
// which was basically a resurgence of #45511 after LLVM's bug 35212 was
727727
// fixed.
728728
//
729-
// This function below is a huge hack around tihs problem. The function
729+
// This function below is a huge hack around this problem. The function
730730
// below is defined in `PassWrapper.cpp` and will basically "merge"
731731
// all `DICompileUnit` instances in a module. Basically it'll take all
732732
// the objects, rewrite all pointers of `DISubprogram` to point to the

src/librustc_trans/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
12401240
/// on), and `ptr` is nonzero-sized, then extracts the size of `ptr`
12411241
/// and the intrinsic for `lt` and passes them to `emit`, which is in
12421242
/// charge of generating code to call the passed intrinsic on whatever
1243-
/// block of generated code is targetted for the intrinsic.
1243+
/// block of generated code is targeted for the intrinsic.
12441244
///
12451245
/// If LLVM lifetime intrinsic support is disabled (i.e. optimizations
12461246
/// off) or `ptr` is zero-sized, then no-op (does not call `emit`).

src/librustc_trans/mir/rvalue.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ fn cast_float_to_int(bx: &Builder,
844844
// They are exactly equal to int_ty::{MIN,MAX} if float_ty has enough significand bits.
845845
// Otherwise, int_ty::MAX must be rounded towards zero, as it is one less than a power of two.
846846
// int_ty::MIN, however, is either zero or a negative power of two and is thus exactly
847-
// representable. Note that this only works if float_ty's exponent range is sufficently large.
847+
// representable. Note that this only works if float_ty's exponent range is sufficiently large.
848848
// f16 or 256 bit integers would break this property. Right now the smallest float type is f32
849849
// with exponents ranging up to 127, which is barely enough for i128::MIN = -2^127.
850850
// On the other hand, f_max works even if int_ty::MAX is greater than float_ty::MAX. Because

0 commit comments

Comments
 (0)