jiebi/CodeConvo huggingface dataset:
error[E0277]: the trait bound `String: Copy` is not satisfied <del> --> $DIR/const-fn-in-vec.rs:4:33 </del> <ins> --> $DIR/const-fn-in-vec.rs:1:47 </ins> | <del> LL |     let strings: [String; 5] = [String::new(); 5]; |                                 ^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String` </del> <ins> LL | static _MAYBE_STRINGS: [Option<String>; 5] = [None; 5]; |                                               ^^^^ the trait `Copy` is not implemented for `String` </ins> | <ins> = note: required for `Option<String>` to implement `Copy` </ins> = note: the `Copy` trait is required because this value will be copied for each element of the array <del> = help: consider creating a new `const` item and initializing it with the result of the function call to be used in the repeat position, like `const VAL: Type = const_fn();` and `let x = [VAL; 42];` </del> = help: create an inline `const` block, see RFC #2920 <https://github.com/rust-lang/rfcs/pull/2920> for more information <ins> help: consider creating a new `const` item and initializing it with the result of the constructor to be used in the repeat position | LL + const ARRAY_REPEAT_VALUE: Option<String> = None; LL ~ static _MAYBE_STRINGS: [Option<String>; 5] = [ARRAY_REPEAT_VALUE; 5]; | error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/const-fn-in-vec.rs:7:34 | LL |     let _strings: [String; 5] = [String::new(); 5]; |                                  ^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String` | = note: the `Copy` trait is required because this value will be copied for each element of the array = help: create an inline `const` block, see RFC #2920 <https://github.com/rust-lang/rfcs/pull/2920> for more information help: consider creating a new `const` item and initializing it with the result of the function call to be used in the repeat position | LL ~     const ARRAY_REPEAT_VALUE: String = String::new(); LL ~     let _strings: [String; 5] = [ARRAY_REPEAT_VALUE; 5]; | error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/const-fn-in-vec.rs:9:48 | LL |     let _maybe_strings: [Option<String>; 5] = [None; 5]; |                                                ^^^^ the trait `Copy` is not implemented for `String` | = note: required for `Option<String>` to implement `Copy` = note: the `Copy` trait is required because this value will be copied for each element of the array = help: create an inline `const` block, see RFC #2920 <https://github.com/rust-lang/rfcs/pull/2920> for more information help: consider creating a new `const` item and initializing it with the result of the constructor to be used in the repeat position | LL ~     const ARRAY_REPEAT_VALUE: Option<String> = None; LL ~     let _maybe_strings: [Option<String>; 5] = [ARRAY_REPEAT_VALUE; 5]; | </ins> <del> error: aborting due to previous error </del> <ins> error: aborting due to 3 previous errors </ins> For more information about this error, try `rustc --explain E0277`.
Self::new(List::empty(), self.reveal()) } <del> /// Creates a suitable environment in which to perform trait /// queries on the given value. When type-checking, this is simply /// the pair of the environment plus value. But when reveal is set to /// All, then if `value` does not reference any type parameters, we will /// pair it with the empty environment. This improves caching and is generally /// invisible. /// /// N.B., we preserve the environment when type-checking because it /// is possible for the user to have wacky where-clauses like /// `where Box<u32>: Copy`, which are clearly never /// satisfiable. We generally want to behave as if they were true, /// although the surrounding function is never reachable. </del> <ins> /// Creates a pair of param-env and value for use in queries. </ins> pub fn and<T: TypeVisitable<TyCtxt<'tcx>>>(self, value: T) -> ParamEnvAnd<'tcx, T> { <del> match self.reveal() { Reveal::UserFacing => ParamEnvAnd { param_env: self, value }, Reveal::All => { if value.is_global() { ParamEnvAnd { param_env: self.without_caller_bounds(), value } } else { ParamEnvAnd { param_env: self, value } } } } </del> <ins> ParamEnvAnd { param_env: self, value } </ins> } }
<ins> // check-pass trait Bar<'a> { type Assoc: 'static; } impl<'a> Bar<'a> for () { type Assoc = (); } struct ImplsStatic<CG: Bar<'static>> { d: &'static <CG as Bar<'static>>::Assoc, } fn caller(b: ImplsStatic<()>) where for<'a> (): Bar<'a> { let _: &<() as Bar<'static>>::Assoc = b.d; } fn main() {} </ins>
fn __rust_alloc_error_handler(size: usize, align: usize) -> !; } <del> /// Abort on memory allocation error or failure. </del> <ins> /// Signal a memory allocation error. </ins> /// <del> /// Callers of memory allocation APIs wishing to abort computation </del> <ins> /// Callers of memory allocation APIs wishing to cease execution </ins> /// in response to an allocation error are encouraged to call this function, <del> /// rather than directly invoking `panic!` or similar. </del> <ins> /// rather than directly invoking [`panic!`] or similar. </ins> /// <del> /// The default behavior of this function is to print a message to standard error /// and abort the process. /// It can be replaced with [`set_alloc_error_hook`] and [`take_alloc_error_hook`]. </del> <ins> /// This function is guaranteed to diverge (not return normally with a value), but depending on /// global configuration, it may either panic (resulting in unwinding or aborting as per /// configuration for all panics), or abort the process (with no unwinding). /// /// The default behavior is: /// ///  * If the binary links against `std` (typically the case), then ///   print a message to standard error and abort the process. ///   This behavior can be replaced with [`set_alloc_error_hook`] and [`take_alloc_error_hook`]. ///   Future versions of Rust may panic by default instead. /// /// * If the binary does not link against `std` (all of its crates are marked ///   [`#![no_std]`][no_std]), then call [`panic!`] with a message. ///   [The panic handler] applies as to any panic. </ins> /// /// [`set_alloc_error_hook`]: ../../std/alloc/fn.set_alloc_error_hook.html /// [`take_alloc_error_hook`]: ../../std/alloc/fn.take_alloc_error_hook.html <ins> /// [The panic handler]: https://doc.rust-lang.org/reference/runtime.html#the-panic_handler-attribute /// [no_std]: https://doc.rust-lang.org/reference/names/preludes.html#the-no_std-attribute </ins> #[stable(feature = "global_alloc", since = "1.28.0")] #[rustc_const_unstable(feature = "const_alloc_error", issue = "92523")] #[cfg(all(not(no_global_oom_handling), not(test)))]
/// Registers a custom allocation error hook, replacing any that was previously registered. /// <del> /// The allocation error hook is invoked when an infallible memory allocation fails, before /// the runtime aborts. The default hook prints a message to standard error, /// but this behavior can be customized with the [`set_alloc_error_hook`] and /// [`take_alloc_error_hook`] functions. </del> <ins> /// The allocation error hook is invoked when an infallible memory allocation fails — that is, /// as a consequence of calling [`handle_alloc_error`] — before the runtime aborts. </ins> /// <del> /// The hook is provided with a `Layout` struct which contains information </del> <ins> /// The allocation error hook is a global resource. [`take_alloc_error_hook`] may be used to /// retrieve a previously registered hook and wrap or discard it. /// /// # What the provided `hook` function should expect /// /// The hook function is provided with a [`Layout`] struct which contains information </ins> /// about the allocation that failed. /// <del> /// The allocation error hook is a global resource. </del> <ins> /// The hook function may choose to panic or abort; in the event that it returns normally, this /// will cause an immediate abort. /// /// Since [`take_alloc_error_hook`] is a safe function that allows retrieving the hook, the hook /// function must be _sound_ to call even if no memory allocations were attempted. /// /// # The default hook /// /// The default hook, used if [`set_alloc_error_hook`] is never called, prints a message to /// standard error (and then returns, causing the runtime to abort the process). /// Compiler options may cause it to panic instead, and the default behavior may be changed /// to panicking in future versions of Rust. </ins> /// /// # Examples ///
tracked!(profile_emit, Some(PathBuf::from("abc"))); tracked!(profile_sample_use, Some(PathBuf::from("abc"))); tracked!(profiler_runtime, "abc".to_string()); <del> tracked!(relax_elf_relocations, Some(false)); </del> <ins> tracked!(relax_elf_relocations, Some(true)); </ins> tracked!(relro_level, Some(RelroLevel::Full)); tracked!(remap_cwd_prefix, Some(PathBuf::from("abc"))); tracked!(report_delayed_bugs, true);
fmt } <del> /// Inline literals into the format string. /// /// Turns /// /// `format_args!("Hello, {}! {} {}", "World", 123, x)` /// /// into /// /// `format_args!("Hello, World! 123 {}", x)`. fn inline_literals(mut fmt: Cow<'_, FormatArgs>) -> Cow<'_, FormatArgs> { let mut was_inlined = vec![false; fmt.arguments.all_args().len()]; let mut inlined_anything = false; for i in 0..fmt.template.len() { let FormatArgsPiece::Placeholder(placeholder) = &fmt.template[i] else { continue }; let Ok(arg_index) = placeholder.argument.index else { continue }; let mut literal = None; if let FormatTrait::Display = placeholder.format_trait && placeholder.format_options == Default::default() && let arg = fmt.arguments.all_args()[arg_index].expr.peel_parens_and_refs() && let ExprKind::Lit(lit) = arg.kind { if let token::LitKind::Str | token::LitKind::StrRaw(_) = lit.kind && let Ok(LitKind::Str(s, _)) = LitKind::from_token_lit(lit) { literal = Some(s); } else if let token::LitKind::Integer = lit.kind && let Ok(LitKind::Int(n, _)) = LitKind::from_token_lit(lit) { literal = Some(Symbol::intern(&n.to_string())); } } if let Some(literal) = literal { // Now we need to mutate the outer FormatArgs. // If this is the first time, this clones the outer FormatArgs. let fmt = fmt.to_mut(); // Replace the placeholder with the literal. fmt.template[i] = FormatArgsPiece::Literal(literal); was_inlined[arg_index] = true; inlined_anything = true; } } // Remove the arguments that were inlined. if inlined_anything { let fmt = fmt.to_mut(); let mut remove = was_inlined; // Don't remove anything that's still used. for_all_argument_indexes(&mut fmt.template, |index| remove[*index] = false); // Drop all the arguments that are marked for removal. let mut remove_it = remove.iter(); fmt.arguments.all_args_mut().retain(|_| remove_it.next() != Some(&true)); // Calculate the mapping of old to new indexes for the remaining arguments. let index_map: Vec<usize> = remove .into_iter() .scan(0, |i, remove| { let mapped = *i; *i += !remove as usize; Some(mapped) }) .collect(); // Correct the indexes that refer to arguments that have shifted position. for_all_argument_indexes(&mut fmt.template, |index| *index = index_map[*index]); } fmt } </del> #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)] enum ArgumentType { Format(FormatTrait),
<ins> //@ only-64bit fn main() { format_args!("{}", 0x8f_i8); // issue #115423 //~^ ERROR literal out of range for `i8` format_args!("{}", 0xffff_ffff_u8); // issue #116633 //~^ ERROR literal out of range for `u8` format_args!("{}", 0xffff_ffff_ffff_ffff_ffff_usize); //~^ ERROR literal out of range for `usize` format_args!("{}", 0x8000_0000_0000_0000_isize); //~^ ERROR literal out of range for `isize` format_args!("{}", 0xffff_ffff); // treat unsuffixed literals as i32 //~^ ERROR literal out of range for `i32` } </ins>
<ins> error: literal out of range for `i8` --> $DIR/no-inline-literals-out-of-range.rs:4:24 | LL |     format_args!("{}", 0x8f_i8); // issue #115423 |                        ^^^^^^^ | = note: the literal `0x8f_i8` (decimal `143`) does not fit into the type `i8` and will become `-113i8` = note: `#[deny(overflowing_literals)]` on by default help: consider using the type `u8` instead | LL |     format_args!("{}", 0x8f_u8); // issue #115423 |                        ~~~~~~~ help: to use as a negative number (decimal `-113`), consider using the type `u8` for the literal and cast it to `i8` | LL |     format_args!("{}", 0x8f_u8 as i8); // issue #115423 |                        ~~~~~~~~~~~~~ error: literal out of range for `u8` --> $DIR/no-inline-literals-out-of-range.rs:6:24 | LL |     format_args!("{}", 0xffff_ffff_u8); // issue #116633 |                        ^^^^^^^^^^^^^^ help: consider using the type `u32` instead: `0xffff_ffff_u32` | = note: the literal `0xffff_ffff_u8` (decimal `4294967295`) does not fit into the type `u8` and will become `255u8` error: literal out of range for `usize` --> $DIR/no-inline-literals-out-of-range.rs:8:24 | LL |     format_args!("{}", 0xffff_ffff_ffff_ffff_ffff_usize); |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: the literal `0xffff_ffff_ffff_ffff_ffff_usize` (decimal `1208925819614629174706175`) does not fit into the type `usize` and will become `18446744073709551615usize` error: literal out of range for `isize` --> $DIR/no-inline-literals-out-of-range.rs:10:24 | LL |     format_args!("{}", 0x8000_0000_0000_0000_isize); |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: the literal `0x8000_0000_0000_0000_isize` (decimal `9223372036854775808`) does not fit into the type `isize` and will become `-9223372036854775808isize` error: literal out of range for `i32` --> $DIR/no-inline-literals-out-of-range.rs:12:24 | LL |     format_args!("{}", 0xffff_ffff); // treat unsuffixed literals as i32 |                        ^^^^^^^^^^^ | = note: the literal `0xffff_ffff` (decimal `4294967295`) does not fit into the type `i32` and will become `-1i32` = help: consider using the type `u32` instead help: to use as a negative number (decimal `-1`), consider using the type `u32` for the literal and cast it to `i32` | LL |     format_args!("{}", 0xffff_ffffu32 as i32); // treat unsuffixed literals as i32 |                        ~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 5 previous errors </ins>
let rem = n % 10; n /= 10; exponent += 1; <del> // round up last digit if rem >= 5 { </del> <ins> // round up last digit, round to even on a tie if rem > 5 || (rem == 5 && (n % 2 != 0 || subtracted_precision > 1 )) { </ins> n += 1; <ins> // if the digit is rounded to the next power // instead adjust the exponent if n.ilog10() > (n - 1).ilog10() { n /= 10; exponent += 1; } </ins> } } (n, exponent, exponent, added_precision)
let big_int: u32 = 314_159_265; assert_eq!(format!("{big_int:.1e}"), format!("{:.1e}", f64::from(big_int))); <del> //test adding precision </del> <ins> // test adding precision </ins> assert_eq!(format!("{:.10e}", i8::MIN), "-1.2800000000e2"); assert_eq!(format!("{:.10e}", i16::MIN), "-3.2768000000e4"); assert_eq!(format!("{:.10e}", i32::MIN), "-2.1474836480e9"); assert_eq!(format!("{:.20e}", i64::MIN), "-9.22337203685477580800e18"); assert_eq!(format!("{:.40e}", i128::MIN), "-1.7014118346046923173168730371588410572800e38"); <del> //test rounding </del> <ins> // test rounding </ins> assert_eq!(format!("{:.1e}", i8::MIN), "-1.3e2"); assert_eq!(format!("{:.1e}", i16::MIN), "-3.3e4"); assert_eq!(format!("{:.1e}", i32::MIN), "-2.1e9"); assert_eq!(format!("{:.1e}", i64::MIN), "-9.2e18"); assert_eq!(format!("{:.1e}", i128::MIN), "-1.7e38"); <del> //test huge precision </del> <ins> // test huge precision </ins> assert_eq!(format!("{:.1000e}", 1), format!("1.{}e0", "0".repeat(1000))); //test zero precision assert_eq!(format!("{:.0e}", 1), format!("1e0",)); assert_eq!(format!("{:.0e}", 35), format!("4e1",)); <del> //test padding with precision (and sign) </del> <ins> // test padding with precision (and sign) </ins> assert_eq!(format!("{:+10.3e}", 1), "  +1.000e0"); <ins> // test precision remains correct when rounding to next power for i in i16::MIN..=i16::MAX { for p in 0..=5 { assert_eq!( format!("{i:.p$e}"), format!("{:.p$e}", f32::from(i)), "integer {i} at precision {p}" ); } } </ins> } #[test]
#[cfg(unix)] use crate::os::unix::fs::symlink as symlink_junction; #[cfg(windows)] <del> use crate::os::windows::fs::{symlink_dir, symlink_file}; </del> <ins> use crate::os::windows::fs::{symlink_dir, symlink_file, OpenOptionsExt}; </ins> #[cfg(windows)] use crate::sys::fs::symlink_junction; #[cfg(target_os = "macos")]
assert_eq!(socket_path.try_exists().unwrap(), true); assert_eq!(socket_path.metadata().is_ok(), true); } <ins> #[cfg(windows)] #[test] fn test_hidden_file_truncation() { // Make sure that File::create works on an existing hidden file. See #115745. let tmpdir = tmpdir(); let path = tmpdir.join("hidden_file.txt"); // Create a hidden file. const FILE_ATTRIBUTE_HIDDEN: u32 = 2; let mut file = OpenOptions::new() .write(true) .create_new(true) .attributes(FILE_ATTRIBUTE_HIDDEN) .open(&path) .unwrap(); file.write("hidden world!".as_bytes()).unwrap(); file.flush().unwrap(); drop(file); // Create a new file by truncating the existing one. let file = File::create(&path).unwrap(); let metadata = file.metadata().unwrap(); assert_eq!(metadata.len(), 0); } </ins>
Windows.Win32.Storage.FileSystem.FILE_ADD_FILE Windows.Win32.Storage.FileSystem.FILE_ADD_SUBDIRECTORY Windows.Win32.Storage.FileSystem.FILE_ALL_ACCESS <ins> Windows.Win32.Storage.FileSystem.FILE_ALLOCATION_INFO </ins> Windows.Win32.Storage.FileSystem.FILE_APPEND_DATA Windows.Win32.Storage.FileSystem.FILE_ATTRIBUTE_ARCHIVE Windows.Win32.Storage.FileSystem.FILE_ATTRIBUTE_COMPRESSED
pub type FILE_ACCESS_RIGHTS = u32; pub const FILE_ADD_FILE: FILE_ACCESS_RIGHTS = 2u32; pub const FILE_ADD_SUBDIRECTORY: FILE_ACCESS_RIGHTS = 4u32; <ins> #[repr(C)] pub struct FILE_ALLOCATION_INFO { pub AllocationSize: i64, } impl ::core::marker::Copy for FILE_ALLOCATION_INFO {} impl ::core::clone::Clone for FILE_ALLOCATION_INFO { fn clone(&self) -> Self { *self } } </ins> pub const FILE_ALL_ACCESS: FILE_ACCESS_RIGHTS = 2032127u32; pub const FILE_APPEND_DATA: FILE_ACCESS_RIGHTS = 4u32; pub const FILE_ATTRIBUTE_ARCHIVE: FILE_FLAGS_AND_ATTRIBUTES = 32u32;
use crate::os::windows::prelude::*; use crate::borrow::Cow; <del> use crate::ffi::OsString; </del> <ins> use crate::ffi::{c_void, OsString}; </ins> use crate::fmt; use crate::io::{self, BorrowedCursor, Error, IoSlice, IoSliceMut, SeekFrom}; use crate::mem::{self, MaybeUninit};
(false, false, false) => c::OPEN_EXISTING, (true, false, false) => c::OPEN_ALWAYS, (false, true, false) => c::TRUNCATE_EXISTING, <del> (true, true, false) => c::CREATE_ALWAYS, </del> <ins> // `CREATE_ALWAYS` has weird semantics so we emulate it using // `OPEN_ALWAYS` and a manual truncation step. See #115745. (true, true, false) => c::OPEN_ALWAYS, </ins> (_, _, true) => c::CREATE_NEW, }) }
impl File { pub fn open(path: &Path, opts: &OpenOptions) -> io::Result<File> { let path = maybe_verbatim(path)?; <ins> let creation = opts.get_creation_mode()?; </ins> let handle = unsafe { c::CreateFileW( path.as_ptr(), opts.get_access_mode()?, opts.share_mode, opts.security_attributes, <del> opts.get_creation_mode()?, </del> <ins> creation, </ins> opts.get_flags_and_attributes(), ptr::null_mut(), ) }; let handle = unsafe { HandleOrInvalid::from_raw_handle(handle) }; <del> if let Ok(handle) = handle.try_into() { </del> <ins> if let Ok(handle) = OwnedHandle::try_from(handle) { // Manual truncation. See #115745. if opts.truncate && creation == c::OPEN_ALWAYS && unsafe { c::GetLastError() } == c::ERROR_ALREADY_EXISTS { unsafe { // Setting the allocation size to zero also sets the // EOF position to zero. let alloc = c::FILE_ALLOCATION_INFO { AllocationSize: 0 }; let result = c::SetFileInformationByHandle( handle.as_raw_handle(), c::FileAllocationInfo, ptr::addr_of!(alloc).cast::<c_void>(), mem::size_of::<c::FILE_ALLOCATION_INFO>() as u32, ); if result == 0 { return Err(io::Error::last_os_error()); } } } </ins> Ok(File { handle: Handle::from_inner(handle) }) } else { Err(Error::last_os_error())
/// Shortens the vector, keeping the first `len` elements and dropping /// the rest. /// <del> /// If `len` is greater than the vector's current length, this has no /// effect. </del> <ins> /// If `len` is greater or equal to the vector's current length, this has /// no effect. </ins> /// /// The [`drain`] method can emulate `truncate`, but causes the excess /// elements to be returned instead of dropped.
if libc::sched_getaffinity(0, mem::size_of::<libc::cpu_set_t>(), &mut set) == 0 { let count = libc::CPU_COUNT(&set) as usize; let count = count.min(quota); <del> // SAFETY: affinity mask can't be empty and the quota gets clamped to a minimum of 1 return Ok(NonZeroUsize::new_unchecked(count)); </del> <ins> // reported to occur on MIPS kernels older than our minimum supported kernel version for those targets let count = NonZeroUsize::new(count) .expect("CPU count must be > 0. This may be a bug in sched_getaffinity(); try upgrading the kernel."); return Ok(count); </ins> } } }
let reachable_context = ReachableContext::new(tcx, method_map); // Step 1: Seed the worklist with all nodes which were found to be public as <del> //         a result of the privacy pass </del> <ins> //         a result of the privacy pass along with all local lang items. If //         other crates link to us, they're going to expect to be able to //         use the lang items, so we need to be sure to mark them as //         exported. let mut worklist = reachable_context.worklist.borrow_mut(); </ins> for &id in exported_items.iter() { <del> let mut worklist = reachable_context.worklist.borrow_mut(); </del> worklist.get().push(id); } <ins> for (_, item) in tcx.lang_items.items() { match *item { Some(did) if is_local(did) => { worklist.get().push(did.node); } _ => {} } } drop(worklist); </ins> // Step 2: Mark all symbols that the symbols on the worklist touch. reachable_context.propagate();
<ins> // Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. #[no_std]; #[lang="fail_"] fn fail(_: *i8, _: *i8, _: uint) -> ! { loop {} } #[no_mangle] pub extern "C" fn rust_stack_exhausted() {} </ins>
<ins> // Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // aux-build:lang-item-public.rs // ignore-fast // ignore-android #[no_std]; extern crate lang_lib = "lang-item-public"; #[cfg(target_os = "linux")] #[link(name = "c")] extern {} #[cfg(target_os = "android")] #[link(name = "c")] extern {} #[cfg(target_os = "freebsd")] #[link(name = "execinfo")] extern {} #[cfg(target_os = "macos")] #[link(name = "System")] extern {} #[start] fn main(_: int, _: **u8) -> int { 1 % 1 } </ins>
///     surprising results upon inspecting the bit patterns, ///     as the same calculations might produce NaNs with different bit patterns. /// <del> /// When the number resulting from a primitive operation (addition, /// subtraction, multiplication, or division) on this type is not exactly /// representable as `f32`, it is rounded according to the roundTiesToEven /// direction defined in IEEE 754-2008. That means: </del> <ins> /// When a primitive operation (addition, subtraction, multiplication, or /// division) is performed on this type, the result is rounded according to the /// roundTiesToEven direction defined in IEEE 754-2008. That means: </ins> /// /// - The result is the representable value closest to the true value, if there ///   is a unique closest representable value.