From 3ab6aeefb15dd82d21c41265cd441e0cea21c6b0 Mon Sep 17 00:00:00 2001 From: Centri3 <114838443+Centri3@users.noreply.github.com> Date: Thu, 25 May 2023 08:02:57 -0500 Subject: [PATCH 1/9] `to_xx_bytes` implemented, `from_xx_bytes` todo Mentioned in #10765 --- CHANGELOG.md | 3 + clippy_lints/src/declared_lints.rs | 3 + clippy_lints/src/endian_bytes.rs | 138 ++++ clippy_lints/src/lib.rs | 2 + tests/ui/endian_bytes.rs | 163 ++++ tests/ui/endian_bytes.stderr | 1152 ++++++++++++++++++++++++++++ 6 files changed, 1461 insertions(+) create mode 100644 clippy_lints/src/endian_bytes.rs create mode 100644 tests/ui/endian_bytes.rs create mode 100644 tests/ui/endian_bytes.stderr diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b609b47d..bfb528546 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4641,6 +4641,7 @@ Released 2018-09-13 [`await_holding_lock`]: https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [`await_holding_refcell_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_refcell_ref [`bad_bit_mask`]: https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask +[`big_endian_bytes`]: https://rust-lang.github.io/rust-clippy/master/index.html#big_endian_bytes [`bind_instead_of_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [`blacklisted_name`]: https://rust-lang.github.io/rust-clippy/master/index.html#blacklisted_name [`blanket_clippy_restriction_lints`]: https://rust-lang.github.io/rust-clippy/master/index.html#blanket_clippy_restriction_lints @@ -4811,6 +4812,7 @@ Released 2018-09-13 [`get_first`]: https://rust-lang.github.io/rust-clippy/master/index.html#get_first [`get_last_with_len`]: https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [`get_unwrap`]: https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap +[`host_endian_bytes`]: https://rust-lang.github.io/rust-clippy/master/index.html#host_endian_bytes [`identity_conversion`]: https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [`identity_op`]: https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [`if_let_mutex`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_let_mutex @@ -4892,6 +4894,7 @@ Released 2018-09-13 [`let_with_type_underscore`]: https://rust-lang.github.io/rust-clippy/master/index.html#let_with_type_underscore [`lines_filter_map_ok`]: https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [`linkedlist`]: https://rust-lang.github.io/rust-clippy/master/index.html#linkedlist +[`little_endian_bytes`]: https://rust-lang.github.io/rust-clippy/master/index.html#little_endian_bytes [`logic_bug`]: https://rust-lang.github.io/rust-clippy/master/index.html#logic_bug [`lossy_float_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#lossy_float_literal [`macro_use_imports`]: https://rust-lang.github.io/rust-clippy/master/index.html#macro_use_imports diff --git a/clippy_lints/src/declared_lints.rs b/clippy_lints/src/declared_lints.rs index a7067d8b8..aaaa38d4d 100644 --- a/clippy_lints/src/declared_lints.rs +++ b/clippy_lints/src/declared_lints.rs @@ -143,6 +143,9 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[ crate::empty_drop::EMPTY_DROP_INFO, crate::empty_enum::EMPTY_ENUM_INFO, crate::empty_structs_with_brackets::EMPTY_STRUCTS_WITH_BRACKETS_INFO, + crate::endian_bytes::BIG_ENDIAN_BYTES_INFO, + crate::endian_bytes::HOST_ENDIAN_BYTES_INFO, + crate::endian_bytes::LITTLE_ENDIAN_BYTES_INFO, crate::entry::MAP_ENTRY_INFO, crate::enum_clike::ENUM_CLIKE_UNPORTABLE_VARIANT_INFO, crate::enum_variants::ENUM_VARIANT_NAMES_INFO, diff --git a/clippy_lints/src/endian_bytes.rs b/clippy_lints/src/endian_bytes.rs new file mode 100644 index 000000000..bf6b92644 --- /dev/null +++ b/clippy_lints/src/endian_bytes.rs @@ -0,0 +1,138 @@ +use clippy_utils::{ + diagnostics::{span_lint_and_help, span_lint_and_then}, + is_lint_allowed, match_def_path, path_def_id, +}; +use rustc_hir::{Expr, ExprKind}; +use rustc_lint::{LateContext, LateLintPass}; +use rustc_session::{declare_lint_pass, declare_tool_lint}; + +declare_clippy_lint! { + /// ### What it does + /// + /// ### Why is this bad? + /// + /// ### Example + /// ```rust + /// // example code where clippy issues a warning + /// ``` + /// Use instead: + /// ```rust + /// // example code which does not raise clippy warning + /// ``` + #[clippy::version = "1.71.0"] + pub HOST_ENDIAN_BYTES, + restriction, + "disallows usage of the `to_ne_bytes` method" +} + +declare_clippy_lint! { + /// ### What it does + /// Checks for the usage of the `to_ne_bytes` method. + /// + /// ### Why is this bad? + /// It's not, but some may prefer to specify the target endianness explicitly. + /// + /// ### Example + /// ```rust,ignore + /// let _x = 2i32.to_ne_bytes(); + /// let _y = 2i64.to_ne_bytes(); + /// ``` + #[clippy::version = "1.71.0"] + pub LITTLE_ENDIAN_BYTES, + restriction, + "disallows usage of the `to_le_bytes` method" +} + +declare_clippy_lint! { + /// ### What it does + /// Checks for the usage of the `to_le_bytes` method. + /// + /// ### Why is this bad? + /// + /// ### Example + /// ```rust,ignore + /// // example code where clippy issues a warning + /// ``` + #[clippy::version = "1.71.0"] + pub BIG_ENDIAN_BYTES, + restriction, + "disallows usage of the `to_be_bytes` method" +} + +declare_lint_pass!(EndianBytes => [HOST_ENDIAN_BYTES, LITTLE_ENDIAN_BYTES, BIG_ENDIAN_BYTES]); + +impl LateLintPass<'_> for EndianBytes { + fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { + if_chain! { + if let ExprKind::MethodCall(method_name, receiver, args, ..) = expr.kind; + if let ExprKind::Lit(..) = receiver.kind; + if args.is_empty(); + then { + if method_name.ident.name == sym!(to_ne_bytes) { + span_lint_and_help( + cx, + HOST_ENDIAN_BYTES, + expr.span, + "use of the method `to_ne_bytes`", + None, + "consider specifying the desired endianness", + ); + } else if method_name.ident.name == sym!(to_le_bytes) { + span_lint_and_then(cx, LITTLE_ENDIAN_BYTES, expr.span, "use of the method `to_le_bytes`", |diag| { + if is_lint_allowed(cx, BIG_ENDIAN_BYTES, expr.hir_id) { + diag.help("use `to_be_bytes` instead"); + } + }); + } else if method_name.ident.name == sym!(to_be_bytes) { + span_lint_and_then(cx, BIG_ENDIAN_BYTES, expr.span, "use of the method `to_be_bytes`", |diag| { + if is_lint_allowed(cx, LITTLE_ENDIAN_BYTES, expr.hir_id) { + diag.help("use `to_le_bytes` instead"); + } + }); + } + + // don't waste time also checking from_**_bytes + return; + } + } + + span_lint_and_help( + cx, + HOST_ENDIAN_BYTES, + expr.span, + "use of the method `from_ne_bytes`", + None, + &format!("consider specifying the desired endianness: {expr:?}"), + ); + + if_chain! { + if let ExprKind::Call(function, args) = expr.kind; + if let Some(function_def_id) = path_def_id(cx, function); + if args.len() == 1; + then { + if match_def_path(cx, function_def_id, &["from_ne_bytes"]) { + span_lint_and_help( + cx, + HOST_ENDIAN_BYTES, + expr.span, + "use of the method `from_ne_bytes`", + None, + "consider specifying the desired endianness", + ); + } else if match_def_path(cx, function_def_id, &["from_le_bytes"]) { + span_lint_and_then(cx, LITTLE_ENDIAN_BYTES, expr.span, "use of the method `from_le_bytes`", |diag| { + if is_lint_allowed(cx, BIG_ENDIAN_BYTES, expr.hir_id) { + diag.help("use `from_be_bytes` instead"); + } + }); + } else if match_def_path(cx, function_def_id, &["from_be_bytes"]) { + span_lint_and_then(cx, BIG_ENDIAN_BYTES, expr.span, "use of the method `from_be_bytes`", |diag| { + if is_lint_allowed(cx, LITTLE_ENDIAN_BYTES, expr.hir_id) { + diag.help("use `from_le_bytes` instead"); + } + }); + } + } + } + } +} diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index a0a89e496..122fc3fee 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -114,6 +114,7 @@ mod else_if_without_else; mod empty_drop; mod empty_enum; mod empty_structs_with_brackets; +mod endian_bytes; mod entry; mod enum_clike; mod enum_variants; @@ -996,6 +997,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf: store.register_late_pass(|_| Box::new(default_constructed_unit_structs::DefaultConstructedUnitStructs)); store.register_early_pass(|| Box::new(needless_else::NeedlessElse)); store.register_late_pass(|_| Box::new(missing_fields_in_debug::MissingFieldsInDebug)); + store.register_late_pass(|_| Box::new(endian_bytes::EndianBytes)); // add lints here, do not remove this comment, it's used in `new_lint` } diff --git a/tests/ui/endian_bytes.rs b/tests/ui/endian_bytes.rs new file mode 100644 index 000000000..1dfda9d53 --- /dev/null +++ b/tests/ui/endian_bytes.rs @@ -0,0 +1,163 @@ +#![allow(unused)] +#![allow(clippy::diverging_sub_expression)] +#![no_main] + +#[warn(clippy::host_endian_bytes)] +fn host() { + 2u8.to_ne_bytes(); + 2i8.to_ne_bytes(); + 2u16.to_ne_bytes(); + 2i16.to_ne_bytes(); + 2u32.to_ne_bytes(); + 2i32.to_ne_bytes(); + 2u64.to_ne_bytes(); + 2i64.to_ne_bytes(); + 2u128.to_ne_bytes(); + 2i128.to_ne_bytes(); + 2usize.to_ne_bytes(); + 2isize.to_ne_bytes(); + 2.0f32.to_ne_bytes(); + 2.0f64.to_ne_bytes(); + u8::from_ne_bytes(todo!()); + i8::from_ne_bytes(todo!()); + u16::from_ne_bytes(todo!()); + i16::from_ne_bytes(todo!()); + u32::from_ne_bytes(todo!()); + i32::from_ne_bytes(todo!()); + u64::from_ne_bytes(todo!()); + i64::from_ne_bytes(todo!()); + u128::from_ne_bytes(todo!()); + i128::from_ne_bytes(todo!()); + f32::from_ne_bytes(todo!()); + f64::from_ne_bytes(todo!()); +} + +#[warn(clippy::little_endian_bytes)] +fn little() { + 2u8.to_le_bytes(); + 2i8.to_le_bytes(); + 2u16.to_le_bytes(); + 2i16.to_le_bytes(); + 2u32.to_le_bytes(); + 2i32.to_le_bytes(); + 2u64.to_le_bytes(); + 2i64.to_le_bytes(); + 2u128.to_le_bytes(); + 2i128.to_le_bytes(); + 2usize.to_le_bytes(); + 2isize.to_le_bytes(); + 2.0f32.to_le_bytes(); + 2.0f64.to_le_bytes(); + u8::from_le_bytes(todo!()); + i8::from_le_bytes(todo!()); + u16::from_le_bytes(todo!()); + i16::from_le_bytes(todo!()); + u32::from_le_bytes(todo!()); + i32::from_le_bytes(todo!()); + u64::from_le_bytes(todo!()); + i64::from_le_bytes(todo!()); + u128::from_le_bytes(todo!()); + i128::from_le_bytes(todo!()); + usize::from_le_bytes(todo!()); + isize::from_le_bytes(todo!()); + f32::from_le_bytes(todo!()); + f64::from_le_bytes(todo!()); +} + +#[warn(clippy::big_endian_bytes)] +fn big() { + 2u8.to_be_bytes(); + 2i8.to_be_bytes(); + 2u16.to_be_bytes(); + 2i16.to_be_bytes(); + 2u32.to_be_bytes(); + 2i32.to_be_bytes(); + 2u64.to_be_bytes(); + 2i64.to_be_bytes(); + 2u128.to_be_bytes(); + 2i128.to_be_bytes(); + 2.0f32.to_be_bytes(); + 2.0f64.to_be_bytes(); + 2usize.to_be_bytes(); + 2isize.to_be_bytes(); + u8::from_be_bytes(todo!()); + i8::from_be_bytes(todo!()); + u16::from_be_bytes(todo!()); + i16::from_be_bytes(todo!()); + u32::from_be_bytes(todo!()); + i32::from_be_bytes(todo!()); + u64::from_be_bytes(todo!()); + i64::from_be_bytes(todo!()); + u128::from_be_bytes(todo!()); + i128::from_be_bytes(todo!()); + usize::from_be_bytes(todo!()); + isize::from_be_bytes(todo!()); + f32::from_be_bytes(todo!()); + f64::from_be_bytes(todo!()); +} + +#[warn(clippy::little_endian_bytes)] +#[warn(clippy::big_endian_bytes)] +fn little_no_help() { + 2u8.to_le_bytes(); + 2i8.to_le_bytes(); + 2u16.to_le_bytes(); + 2i16.to_le_bytes(); + 2u32.to_le_bytes(); + 2i32.to_le_bytes(); + 2u64.to_le_bytes(); + 2i64.to_le_bytes(); + 2u128.to_le_bytes(); + 2i128.to_le_bytes(); + 2usize.to_le_bytes(); + 2isize.to_le_bytes(); + 2.0f32.to_le_bytes(); + 2.0f64.to_le_bytes(); + u8::from_le_bytes(todo!()); + i8::from_le_bytes(todo!()); + u16::from_le_bytes(todo!()); + i16::from_le_bytes(todo!()); + u32::from_le_bytes(todo!()); + i32::from_le_bytes(todo!()); + u64::from_le_bytes(todo!()); + i64::from_le_bytes(todo!()); + u128::from_le_bytes(todo!()); + i128::from_le_bytes(todo!()); + usize::from_le_bytes(todo!()); + isize::from_le_bytes(todo!()); + f32::from_le_bytes(todo!()); + f64::from_le_bytes(todo!()); +} + +#[warn(clippy::big_endian_bytes)] +#[warn(clippy::little_endian_bytes)] +fn big_no_help() { + 2u8.to_be_bytes(); + 2i8.to_be_bytes(); + 2u16.to_be_bytes(); + 2i16.to_be_bytes(); + 2u32.to_be_bytes(); + 2i32.to_be_bytes(); + 2u64.to_be_bytes(); + 2i64.to_be_bytes(); + 2u128.to_be_bytes(); + 2i128.to_be_bytes(); + 2usize.to_be_bytes(); + 2isize.to_be_bytes(); + 2.0f32.to_be_bytes(); + 2.0f64.to_be_bytes(); + u8::from_be_bytes(todo!()); + i8::from_be_bytes(todo!()); + u16::from_be_bytes(todo!()); + i16::from_be_bytes(todo!()); + u32::from_be_bytes(todo!()); + i32::from_be_bytes(todo!()); + u64::from_be_bytes(todo!()); + i64::from_be_bytes(todo!()); + u128::from_be_bytes(todo!()); + i128::from_be_bytes(todo!()); + usize::from_be_bytes(todo!()); + isize::from_be_bytes(todo!()); + f32::from_be_bytes(todo!()); + f64::from_be_bytes(todo!()); +} diff --git a/tests/ui/endian_bytes.stderr b/tests/ui/endian_bytes.stderr new file mode 100644 index 000000000..afbb8e3b1 --- /dev/null +++ b/tests/ui/endian_bytes.stderr @@ -0,0 +1,1152 @@ +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:6:11 + | +LL | fn host() { + | ___________^ +LL | | 2u8.to_ne_bytes(); +LL | | 2i8.to_ne_bytes(); +LL | | 2u16.to_ne_bytes(); +... | +LL | | f64::from_ne_bytes(todo!()); +LL | | } + | |_^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).202), kind: Block(Block { stmts: [Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).4), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).1), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).2), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).3), kind: Lit(Spanned { node: Int(2, Unsigned(U8)), span: $DIR/endian_bytes.rs:7:5: 7:8 (#0) }), span: $DIR/endian_bytes.rs:7:5: 7:8 (#0) }, [], $DIR/endian_bytes.rs:7:9: 7:22 (#0)), span: $DIR/endian_bytes.rs:7:5: 7:22 (#0) }), span: $DIR/endian_bytes.rs:7:5: 7:23 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).8), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).5), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).6), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).7), kind: Lit(Spanned { node: Int(2, Signed(I8)), span: $DIR/endian_bytes.rs:8:5: 8:8 (#0) }), span: $DIR/endian_bytes.rs:8:5: 8:8 (#0) }, [], $DIR/endian_bytes.rs:8:9: 8:22 (#0)), span: $DIR/endian_bytes.rs:8:5: 8:22 (#0) }), span: $DIR/endian_bytes.rs:8:5: 8:23 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).12), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).9), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).10), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).11), kind: Lit(Spanned { node: Int(2, Unsigned(U16)), span: $DIR/endian_bytes.rs:9:5: 9:9 (#0) }), span: $DIR/endian_bytes.rs:9:5: 9:9 (#0) }, [], $DIR/endian_bytes.rs:9:10: 9:23 (#0)), span: $DIR/endian_bytes.rs:9:5: 9:23 (#0) }), span: $DIR/endian_bytes.rs:9:5: 9:24 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).16), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).13), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).14), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).15), kind: Lit(Spanned { node: Int(2, Signed(I16)), span: $DIR/endian_bytes.rs:10:5: 10:9 (#0) }), span: $DIR/endian_bytes.rs:10:5: 10:9 (#0) }, [], $DIR/endian_bytes.rs:10:10: 10:23 (#0)), span: $DIR/endian_bytes.rs:10:5: 10:23 (#0) }), span: $DIR/endian_bytes.rs:10:5: 10:24 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).20), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).17), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).18), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).19), kind: Lit(Spanned { node: Int(2, Unsigned(U32)), span: $DIR/endian_bytes.rs:11:5: 11:9 (#0) }), span: $DIR/endian_bytes.rs:11:5: 11:9 (#0) }, [], $DIR/endian_bytes.rs:11:10: 11:23 (#0)), span: $DIR/endian_bytes.rs:11:5: 11:23 (#0) }), span: $DIR/endian_bytes.rs:11:5: 11:24 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).24), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).21), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).22), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).23), kind: Lit(Spanned { node: Int(2, Signed(I32)), span: $DIR/endian_bytes.rs:12:5: 12:9 (#0) }), span: $DIR/endian_bytes.rs:12:5: 12:9 (#0) }, [], $DIR/endian_bytes.rs:12:10: 12:23 (#0)), span: $DIR/endian_bytes.rs:12:5: 12:23 (#0) }), span: $DIR/endian_bytes.rs:12:5: 12:24 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).28), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).25), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).26), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).27), kind: Lit(Spanned { node: Int(2, Unsigned(U64)), span: $DIR/endian_bytes.rs:13:5: 13:9 (#0) }), span: $DIR/endian_bytes.rs:13:5: 13:9 (#0) }, [], $DIR/endian_bytes.rs:13:10: 13:23 (#0)), span: $DIR/endian_bytes.rs:13:5: 13:23 (#0) }), span: $DIR/endian_bytes.rs:13:5: 13:24 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).32), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).29), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).30), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).31), kind: Lit(Spanned { node: Int(2, Signed(I64)), span: $DIR/endian_bytes.rs:14:5: 14:9 (#0) }), span: $DIR/endian_bytes.rs:14:5: 14:9 (#0) }, [], $DIR/endian_bytes.rs:14:10: 14:23 (#0)), span: $DIR/endian_bytes.rs:14:5: 14:23 (#0) }), span: $DIR/endian_bytes.rs:14:5: 14:24 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).36), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).33), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).34), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).35), kind: Lit(Spanned { node: Int(2, Unsigned(U128)), span: $DIR/endian_bytes.rs:15:5: 15:10 (#0) }), span: $DIR/endian_bytes.rs:15:5: 15:10 (#0) }, [], $DIR/endian_bytes.rs:15:11: 15:24 (#0)), span: $DIR/endian_bytes.rs:15:5: 15:24 (#0) }), span: $DIR/endian_bytes.rs:15:5: 15:25 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).40), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).37), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).38), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).39), kind: Lit(Spanned { node: Int(2, Signed(I128)), span: $DIR/endian_bytes.rs:16:5: 16:10 (#0) }), span: $DIR/endian_bytes.rs:16:5: 16:10 (#0) }, [], $DIR/endian_bytes.rs:16:11: 16:24 (#0)), span: $DIR/endian_bytes.rs:16:5: 16:24 (#0) }), span: $DIR/endian_bytes.rs:16:5: 16:25 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).44), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).41), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).42), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).43), kind: Lit(Spanned { node: Int(2, Unsigned(Usize)), span: $DIR/endian_bytes.rs:17:5: 17:11 (#0) }), span: $DIR/endian_bytes.rs:17:5: 17:11 (#0) }, [], $DIR/endian_bytes.rs:17:12: 17:25 (#0)), span: $DIR/endian_bytes.rs:17:5: 17:25 (#0) }), span: $DIR/endian_bytes.rs:17:5: 17:26 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).48), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).45), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).46), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).47), kind: Lit(Spanned { node: Int(2, Signed(Isize)), span: $DIR/endian_bytes.rs:18:5: 18:11 (#0) }), span: $DIR/endian_bytes.rs:18:5: 18:11 (#0) }, [], $DIR/endian_bytes.rs:18:12: 18:25 (#0)), span: $DIR/endian_bytes.rs:18:5: 18:25 (#0) }), span: $DIR/endian_bytes.rs:18:5: 18:26 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).52), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).49), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).50), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).51), kind: Lit(Spanned { node: Float("2.0", Suffixed(F32)), span: $DIR/endian_bytes.rs:19:5: 19:11 (#0) }), span: $DIR/endian_bytes.rs:19:5: 19:11 (#0) }, [], $DIR/endian_bytes.rs:19:12: 19:25 (#0)), span: $DIR/endian_bytes.rs:19:5: 19:25 (#0) }), span: $DIR/endian_bytes.rs:19:5: 19:26 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).56), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).53), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).54), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).55), kind: Lit(Spanned { node: Float("2.0", Suffixed(F64)), span: $DIR/endian_bytes.rs:20:5: 20:11 (#0) }), span: $DIR/endian_bytes.rs:20:5: 20:11 (#0) }, [], $DIR/endian_bytes.rs:20:12: 20:25 (#0)), span: $DIR/endian_bytes.rs:20:5: 20:25 (#0) }), span: $DIR/endian_bytes.rs:20:5: 20:26 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).68), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).57), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).58), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).60), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:21:5: 21:7 (#0), res: PrimTy(Uint(U8)), segments: [PathSegment { ident: u8#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).59), res: PrimTy(Uint(U8)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:21:5: 21:7 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).61), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:21:5: 21:22 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).62), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).63), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).64), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).65), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).66), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).67), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#4) }]), span: $DIR/endian_bytes.rs:21:5: 21:31 (#0) }), span: $DIR/endian_bytes.rs:21:5: 21:32 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).80), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).69), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).70), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).72), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:22:5: 22:7 (#0), res: PrimTy(Int(I8)), segments: [PathSegment { ident: i8#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).71), res: PrimTy(Int(I8)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:22:5: 22:7 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).73), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:22:5: 22:22 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).74), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).75), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).76), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).77), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).78), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).79), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#5) }]), span: $DIR/endian_bytes.rs:22:5: 22:31 (#0) }), span: $DIR/endian_bytes.rs:22:5: 22:32 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).92), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).81), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).82), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).84), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:23:5: 23:8 (#0), res: PrimTy(Uint(U16)), segments: [PathSegment { ident: u16#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).83), res: PrimTy(Uint(U16)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:23:5: 23:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).85), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:23:5: 23:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).86), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).87), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).88), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).89), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).90), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).91), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#6) }]), span: $DIR/endian_bytes.rs:23:5: 23:32 (#0) }), span: $DIR/endian_bytes.rs:23:5: 23:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).104), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).93), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).94), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).96), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:24:5: 24:8 (#0), res: PrimTy(Int(I16)), segments: [PathSegment { ident: i16#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).95), res: PrimTy(Int(I16)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:24:5: 24:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).97), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:24:5: 24:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).98), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).99), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).100), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).101), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).102), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).103), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#7) }]), span: $DIR/endian_bytes.rs:24:5: 24:32 (#0) }), span: $DIR/endian_bytes.rs:24:5: 24:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).116), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).105), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).106), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).108), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:25:5: 25:8 (#0), res: PrimTy(Uint(U32)), segments: [PathSegment { ident: u32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).107), res: PrimTy(Uint(U32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:25:5: 25:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).109), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:25:5: 25:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).110), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).111), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).112), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).113), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).114), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).115), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#8) }]), span: $DIR/endian_bytes.rs:25:5: 25:32 (#0) }), span: $DIR/endian_bytes.rs:25:5: 25:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).128), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).117), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).118), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).120), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:26:5: 26:8 (#0), res: PrimTy(Int(I32)), segments: [PathSegment { ident: i32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).119), res: PrimTy(Int(I32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:26:5: 26:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).121), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:26:5: 26:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).122), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).123), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).124), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).125), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).126), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).127), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#9) }]), span: $DIR/endian_bytes.rs:26:5: 26:32 (#0) }), span: $DIR/endian_bytes.rs:26:5: 26:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).140), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).129), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).130), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).132), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:27:5: 27:8 (#0), res: PrimTy(Uint(U64)), segments: [PathSegment { ident: u64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).131), res: PrimTy(Uint(U64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:27:5: 27:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).133), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:27:5: 27:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).134), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).135), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).136), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).137), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).138), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).139), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#10) }]), span: $DIR/endian_bytes.rs:27:5: 27:32 (#0) }), span: $DIR/endian_bytes.rs:27:5: 27:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).152), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).141), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).142), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).144), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:28:5: 28:8 (#0), res: PrimTy(Int(I64)), segments: [PathSegment { ident: i64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).143), res: PrimTy(Int(I64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:28:5: 28:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).145), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:28:5: 28:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).146), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).147), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).148), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).149), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).150), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).151), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#11) }]), span: $DIR/endian_bytes.rs:28:5: 28:32 (#0) }), span: $DIR/endian_bytes.rs:28:5: 28:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).164), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).153), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).154), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).156), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:29:5: 29:9 (#0), res: PrimTy(Uint(U128)), segments: [PathSegment { ident: u128#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).155), res: PrimTy(Uint(U128)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:29:5: 29:9 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).157), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:29:5: 29:24 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).158), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).159), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).160), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).161), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).162), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).163), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#12) }]), span: $DIR/endian_bytes.rs:29:5: 29:33 (#0) }), span: $DIR/endian_bytes.rs:29:5: 29:34 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).176), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).165), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).166), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).168), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:30:5: 30:9 (#0), res: PrimTy(Int(I128)), segments: [PathSegment { ident: i128#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).167), res: PrimTy(Int(I128)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:30:5: 30:9 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).169), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:30:5: 30:24 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).170), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).171), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).172), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).173), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).174), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).175), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#13) }]), span: $DIR/endian_bytes.rs:30:5: 30:33 (#0) }), span: $DIR/endian_bytes.rs:30:5: 30:34 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).188), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).177), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).178), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).180), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:31:5: 31:8 (#0), res: PrimTy(Float(F32)), segments: [PathSegment { ident: f32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).179), res: PrimTy(Float(F32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:31:5: 31:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).181), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:31:5: 31:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).182), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).183), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).184), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).185), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).186), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).187), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#14) }]), span: $DIR/endian_bytes.rs:31:5: 31:32 (#0) }), span: $DIR/endian_bytes.rs:31:5: 31:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).200), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).189), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).190), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).192), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:32:5: 32:8 (#0), res: PrimTy(Float(F64)), segments: [PathSegment { ident: f64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).191), res: PrimTy(Float(F64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:32:5: 32:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).193), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:32:5: 32:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).194), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).195), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).196), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).197), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).198), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).199), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#15) }]), span: $DIR/endian_bytes.rs:32:5: 32:32 (#0) }), span: $DIR/endian_bytes.rs:32:5: 32:33 (#0) }], expr: None, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).201), rules: DefaultBlock, span: $DIR/endian_bytes.rs:6:11: 33:2 (#0), targeted_by_break: false }, None), span: $DIR/endian_bytes.rs:6:11: 33:2 (#0) } + = note: `-D clippy::host-endian-bytes` implied by `-D warnings` + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:7:5 + | +LL | 2u8.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:7:5 + | +LL | 2u8.to_ne_bytes(); + | ^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).3), kind: Lit(Spanned { node: Int(2, Unsigned(U8)), span: $DIR/endian_bytes.rs:7:5: 7:8 (#0) }), span: $DIR/endian_bytes.rs:7:5: 7:8 (#0) } + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:8:5 + | +LL | 2i8.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:8:5 + | +LL | 2i8.to_ne_bytes(); + | ^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).7), kind: Lit(Spanned { node: Int(2, Signed(I8)), span: $DIR/endian_bytes.rs:8:5: 8:8 (#0) }), span: $DIR/endian_bytes.rs:8:5: 8:8 (#0) } + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:9:5 + | +LL | 2u16.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:9:5 + | +LL | 2u16.to_ne_bytes(); + | ^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).11), kind: Lit(Spanned { node: Int(2, Unsigned(U16)), span: $DIR/endian_bytes.rs:9:5: 9:9 (#0) }), span: $DIR/endian_bytes.rs:9:5: 9:9 (#0) } + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:10:5 + | +LL | 2i16.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:10:5 + | +LL | 2i16.to_ne_bytes(); + | ^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).15), kind: Lit(Spanned { node: Int(2, Signed(I16)), span: $DIR/endian_bytes.rs:10:5: 10:9 (#0) }), span: $DIR/endian_bytes.rs:10:5: 10:9 (#0) } + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:11:5 + | +LL | 2u32.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:11:5 + | +LL | 2u32.to_ne_bytes(); + | ^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).19), kind: Lit(Spanned { node: Int(2, Unsigned(U32)), span: $DIR/endian_bytes.rs:11:5: 11:9 (#0) }), span: $DIR/endian_bytes.rs:11:5: 11:9 (#0) } + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:12:5 + | +LL | 2i32.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:12:5 + | +LL | 2i32.to_ne_bytes(); + | ^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).23), kind: Lit(Spanned { node: Int(2, Signed(I32)), span: $DIR/endian_bytes.rs:12:5: 12:9 (#0) }), span: $DIR/endian_bytes.rs:12:5: 12:9 (#0) } + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:13:5 + | +LL | 2u64.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:13:5 + | +LL | 2u64.to_ne_bytes(); + | ^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).27), kind: Lit(Spanned { node: Int(2, Unsigned(U64)), span: $DIR/endian_bytes.rs:13:5: 13:9 (#0) }), span: $DIR/endian_bytes.rs:13:5: 13:9 (#0) } + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:14:5 + | +LL | 2i64.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:14:5 + | +LL | 2i64.to_ne_bytes(); + | ^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).31), kind: Lit(Spanned { node: Int(2, Signed(I64)), span: $DIR/endian_bytes.rs:14:5: 14:9 (#0) }), span: $DIR/endian_bytes.rs:14:5: 14:9 (#0) } + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:15:5 + | +LL | 2u128.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:15:5 + | +LL | 2u128.to_ne_bytes(); + | ^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).35), kind: Lit(Spanned { node: Int(2, Unsigned(U128)), span: $DIR/endian_bytes.rs:15:5: 15:10 (#0) }), span: $DIR/endian_bytes.rs:15:5: 15:10 (#0) } + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:16:5 + | +LL | 2i128.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:16:5 + | +LL | 2i128.to_ne_bytes(); + | ^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).39), kind: Lit(Spanned { node: Int(2, Signed(I128)), span: $DIR/endian_bytes.rs:16:5: 16:10 (#0) }), span: $DIR/endian_bytes.rs:16:5: 16:10 (#0) } + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:17:5 + | +LL | 2usize.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:17:5 + | +LL | 2usize.to_ne_bytes(); + | ^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).43), kind: Lit(Spanned { node: Int(2, Unsigned(Usize)), span: $DIR/endian_bytes.rs:17:5: 17:11 (#0) }), span: $DIR/endian_bytes.rs:17:5: 17:11 (#0) } + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:18:5 + | +LL | 2isize.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:18:5 + | +LL | 2isize.to_ne_bytes(); + | ^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).47), kind: Lit(Spanned { node: Int(2, Signed(Isize)), span: $DIR/endian_bytes.rs:18:5: 18:11 (#0) }), span: $DIR/endian_bytes.rs:18:5: 18:11 (#0) } + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:19:5 + | +LL | 2.0f32.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:19:5 + | +LL | 2.0f32.to_ne_bytes(); + | ^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).51), kind: Lit(Spanned { node: Float("2.0", Suffixed(F32)), span: $DIR/endian_bytes.rs:19:5: 19:11 (#0) }), span: $DIR/endian_bytes.rs:19:5: 19:11 (#0) } + +error: use of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:20:5 + | +LL | 2.0f64.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:20:5 + | +LL | 2.0f64.to_ne_bytes(); + | ^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).55), kind: Lit(Spanned { node: Float("2.0", Suffixed(F64)), span: $DIR/endian_bytes.rs:20:5: 20:11 (#0) }), span: $DIR/endian_bytes.rs:20:5: 20:11 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:21:5 + | +LL | u8::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).57), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).58), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).60), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:21:5: 21:7 (#0), res: PrimTy(Uint(U8)), segments: [PathSegment { ident: u8#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).59), res: PrimTy(Uint(U8)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:21:5: 21:7 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).61), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:21:5: 21:22 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).62), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).63), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).64), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).65), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).66), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).67), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#4) }]), span: $DIR/endian_bytes.rs:21:5: 21:31 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:21:5 + | +LL | u8::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).58), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).60), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:21:5: 21:7 (#0), res: PrimTy(Uint(U8)), segments: [PathSegment { ident: u8#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).59), res: PrimTy(Uint(U8)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:21:5: 21:7 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).61), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:21:5: 21:22 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:21:23 + | +LL | u8::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).62), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).63), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).64), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).65), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).66), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).67), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#4) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:21:23 + | +LL | u8::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).63), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).64), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).65), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).66), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:21:23 + | +LL | u8::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).67), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:22:5 + | +LL | i8::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).69), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).70), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).72), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:22:5: 22:7 (#0), res: PrimTy(Int(I8)), segments: [PathSegment { ident: i8#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).71), res: PrimTy(Int(I8)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:22:5: 22:7 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).73), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:22:5: 22:22 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).74), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).75), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).76), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).77), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).78), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).79), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#5) }]), span: $DIR/endian_bytes.rs:22:5: 22:31 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:22:5 + | +LL | i8::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).70), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).72), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:22:5: 22:7 (#0), res: PrimTy(Int(I8)), segments: [PathSegment { ident: i8#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).71), res: PrimTy(Int(I8)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:22:5: 22:7 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).73), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:22:5: 22:22 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:22:23 + | +LL | i8::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).74), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).75), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).76), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).77), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).78), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).79), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#5) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:22:23 + | +LL | i8::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).75), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).76), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).77), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).78), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:22:23 + | +LL | i8::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).79), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:23:5 + | +LL | u16::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).81), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).82), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).84), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:23:5: 23:8 (#0), res: PrimTy(Uint(U16)), segments: [PathSegment { ident: u16#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).83), res: PrimTy(Uint(U16)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:23:5: 23:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).85), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:23:5: 23:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).86), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).87), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).88), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).89), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).90), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).91), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#6) }]), span: $DIR/endian_bytes.rs:23:5: 23:32 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:23:5 + | +LL | u16::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).82), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).84), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:23:5: 23:8 (#0), res: PrimTy(Uint(U16)), segments: [PathSegment { ident: u16#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).83), res: PrimTy(Uint(U16)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:23:5: 23:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).85), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:23:5: 23:23 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:23:24 + | +LL | u16::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).86), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).87), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).88), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).89), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).90), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).91), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#6) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:23:24 + | +LL | u16::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).87), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).88), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).89), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).90), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:23:24 + | +LL | u16::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).91), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:24:5 + | +LL | i16::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).93), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).94), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).96), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:24:5: 24:8 (#0), res: PrimTy(Int(I16)), segments: [PathSegment { ident: i16#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).95), res: PrimTy(Int(I16)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:24:5: 24:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).97), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:24:5: 24:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).98), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).99), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).100), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).101), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).102), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).103), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#7) }]), span: $DIR/endian_bytes.rs:24:5: 24:32 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:24:5 + | +LL | i16::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).94), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).96), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:24:5: 24:8 (#0), res: PrimTy(Int(I16)), segments: [PathSegment { ident: i16#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).95), res: PrimTy(Int(I16)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:24:5: 24:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).97), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:24:5: 24:23 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:24:24 + | +LL | i16::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).98), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).99), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).100), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).101), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).102), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).103), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#7) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:24:24 + | +LL | i16::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).99), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).100), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).101), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).102), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:24:24 + | +LL | i16::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).103), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:25:5 + | +LL | u32::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).105), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).106), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).108), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:25:5: 25:8 (#0), res: PrimTy(Uint(U32)), segments: [PathSegment { ident: u32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).107), res: PrimTy(Uint(U32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:25:5: 25:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).109), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:25:5: 25:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).110), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).111), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).112), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).113), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).114), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).115), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#8) }]), span: $DIR/endian_bytes.rs:25:5: 25:32 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:25:5 + | +LL | u32::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).106), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).108), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:25:5: 25:8 (#0), res: PrimTy(Uint(U32)), segments: [PathSegment { ident: u32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).107), res: PrimTy(Uint(U32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:25:5: 25:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).109), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:25:5: 25:23 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:25:24 + | +LL | u32::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).110), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).111), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).112), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).113), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).114), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).115), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#8) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:25:24 + | +LL | u32::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).111), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).112), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).113), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).114), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:25:24 + | +LL | u32::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).115), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:26:5 + | +LL | i32::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).117), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).118), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).120), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:26:5: 26:8 (#0), res: PrimTy(Int(I32)), segments: [PathSegment { ident: i32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).119), res: PrimTy(Int(I32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:26:5: 26:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).121), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:26:5: 26:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).122), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).123), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).124), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).125), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).126), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).127), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#9) }]), span: $DIR/endian_bytes.rs:26:5: 26:32 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:26:5 + | +LL | i32::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).118), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).120), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:26:5: 26:8 (#0), res: PrimTy(Int(I32)), segments: [PathSegment { ident: i32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).119), res: PrimTy(Int(I32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:26:5: 26:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).121), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:26:5: 26:23 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:26:24 + | +LL | i32::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).122), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).123), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).124), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).125), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).126), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).127), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#9) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:26:24 + | +LL | i32::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).123), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).124), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).125), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).126), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:26:24 + | +LL | i32::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).127), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:27:5 + | +LL | u64::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).129), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).130), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).132), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:27:5: 27:8 (#0), res: PrimTy(Uint(U64)), segments: [PathSegment { ident: u64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).131), res: PrimTy(Uint(U64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:27:5: 27:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).133), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:27:5: 27:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).134), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).135), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).136), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).137), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).138), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).139), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#10) }]), span: $DIR/endian_bytes.rs:27:5: 27:32 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:27:5 + | +LL | u64::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).130), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).132), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:27:5: 27:8 (#0), res: PrimTy(Uint(U64)), segments: [PathSegment { ident: u64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).131), res: PrimTy(Uint(U64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:27:5: 27:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).133), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:27:5: 27:23 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:27:24 + | +LL | u64::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).134), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).135), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).136), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).137), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).138), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).139), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#10) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:27:24 + | +LL | u64::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).135), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).136), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).137), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).138), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:27:24 + | +LL | u64::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).139), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:28:5 + | +LL | i64::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).141), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).142), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).144), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:28:5: 28:8 (#0), res: PrimTy(Int(I64)), segments: [PathSegment { ident: i64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).143), res: PrimTy(Int(I64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:28:5: 28:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).145), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:28:5: 28:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).146), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).147), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).148), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).149), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).150), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).151), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#11) }]), span: $DIR/endian_bytes.rs:28:5: 28:32 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:28:5 + | +LL | i64::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).142), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).144), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:28:5: 28:8 (#0), res: PrimTy(Int(I64)), segments: [PathSegment { ident: i64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).143), res: PrimTy(Int(I64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:28:5: 28:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).145), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:28:5: 28:23 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:28:24 + | +LL | i64::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).146), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).147), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).148), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).149), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).150), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).151), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#11) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:28:24 + | +LL | i64::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).147), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).148), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).149), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).150), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:28:24 + | +LL | i64::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).151), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:29:5 + | +LL | u128::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).153), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).154), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).156), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:29:5: 29:9 (#0), res: PrimTy(Uint(U128)), segments: [PathSegment { ident: u128#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).155), res: PrimTy(Uint(U128)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:29:5: 29:9 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).157), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:29:5: 29:24 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).158), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).159), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).160), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).161), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).162), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).163), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#12) }]), span: $DIR/endian_bytes.rs:29:5: 29:33 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:29:5 + | +LL | u128::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).154), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).156), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:29:5: 29:9 (#0), res: PrimTy(Uint(U128)), segments: [PathSegment { ident: u128#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).155), res: PrimTy(Uint(U128)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:29:5: 29:9 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).157), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:29:5: 29:24 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:29:25 + | +LL | u128::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).158), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).159), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).160), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).161), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).162), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).163), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#12) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:29:25 + | +LL | u128::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).159), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).160), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).161), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).162), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:29:25 + | +LL | u128::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).163), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:30:5 + | +LL | i128::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).165), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).166), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).168), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:30:5: 30:9 (#0), res: PrimTy(Int(I128)), segments: [PathSegment { ident: i128#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).167), res: PrimTy(Int(I128)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:30:5: 30:9 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).169), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:30:5: 30:24 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).170), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).171), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).172), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).173), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).174), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).175), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#13) }]), span: $DIR/endian_bytes.rs:30:5: 30:33 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:30:5 + | +LL | i128::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).166), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).168), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:30:5: 30:9 (#0), res: PrimTy(Int(I128)), segments: [PathSegment { ident: i128#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).167), res: PrimTy(Int(I128)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:30:5: 30:9 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).169), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:30:5: 30:24 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:30:25 + | +LL | i128::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).170), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).171), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).172), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).173), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).174), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).175), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#13) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:30:25 + | +LL | i128::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).171), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).172), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).173), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).174), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:30:25 + | +LL | i128::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).175), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:31:5 + | +LL | f32::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).177), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).178), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).180), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:31:5: 31:8 (#0), res: PrimTy(Float(F32)), segments: [PathSegment { ident: f32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).179), res: PrimTy(Float(F32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:31:5: 31:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).181), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:31:5: 31:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).182), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).183), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).184), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).185), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).186), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).187), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#14) }]), span: $DIR/endian_bytes.rs:31:5: 31:32 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:31:5 + | +LL | f32::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).178), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).180), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:31:5: 31:8 (#0), res: PrimTy(Float(F32)), segments: [PathSegment { ident: f32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).179), res: PrimTy(Float(F32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:31:5: 31:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).181), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:31:5: 31:23 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:31:24 + | +LL | f32::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).182), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).183), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).184), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).185), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).186), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).187), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#14) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:31:24 + | +LL | f32::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).183), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).184), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).185), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).186), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:31:24 + | +LL | f32::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).187), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:32:5 + | +LL | f64::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).189), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).190), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).192), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:32:5: 32:8 (#0), res: PrimTy(Float(F64)), segments: [PathSegment { ident: f64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).191), res: PrimTy(Float(F64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:32:5: 32:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).193), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:32:5: 32:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).194), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).195), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).196), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).197), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).198), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).199), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#15) }]), span: $DIR/endian_bytes.rs:32:5: 32:32 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:32:5 + | +LL | f64::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).190), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).192), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:32:5: 32:8 (#0), res: PrimTy(Float(F64)), segments: [PathSegment { ident: f64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).191), res: PrimTy(Float(F64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:32:5: 32:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).193), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:32:5: 32:23 (#0) } + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:32:24 + | +LL | f64::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).194), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).195), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).196), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).197), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).198), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).199), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#15) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:32:24 + | +LL | f64::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).195), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).196), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).197), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).198), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:32:24 + | +LL | f64::from_ne_bytes(todo!()); + | ^^^^^^^ + | + = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).199), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) } + = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:37:5 + | +LL | 2u8.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + = note: `-D clippy::little-endian-bytes` implied by `-D warnings` + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:38:5 + | +LL | 2i8.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:39:5 + | +LL | 2u16.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:40:5 + | +LL | 2i16.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:41:5 + | +LL | 2u32.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:42:5 + | +LL | 2i32.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:43:5 + | +LL | 2u64.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:44:5 + | +LL | 2i64.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:45:5 + | +LL | 2u128.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:46:5 + | +LL | 2i128.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:47:5 + | +LL | 2usize.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:48:5 + | +LL | 2isize.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:49:5 + | +LL | 2.0f32.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:50:5 + | +LL | 2.0f64.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: use `to_be_bytes` instead + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:69:5 + | +LL | 2u8.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + = note: `-D clippy::big-endian-bytes` implied by `-D warnings` + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:70:5 + | +LL | 2i8.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:71:5 + | +LL | 2u16.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:72:5 + | +LL | 2i16.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:73:5 + | +LL | 2u32.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:74:5 + | +LL | 2i32.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:75:5 + | +LL | 2u64.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:76:5 + | +LL | 2i64.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:77:5 + | +LL | 2u128.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:78:5 + | +LL | 2i128.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:79:5 + | +LL | 2.0f32.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:80:5 + | +LL | 2.0f64.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:81:5 + | +LL | 2usize.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:82:5 + | +LL | 2isize.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: use `to_le_bytes` instead + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:102:5 + | +LL | 2u8.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^ + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:103:5 + | +LL | 2i8.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^ + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:104:5 + | +LL | 2u16.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:105:5 + | +LL | 2i16.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:106:5 + | +LL | 2u32.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:107:5 + | +LL | 2i32.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:108:5 + | +LL | 2u64.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:109:5 + | +LL | 2i64.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:110:5 + | +LL | 2u128.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:111:5 + | +LL | 2i128.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:112:5 + | +LL | 2usize.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:113:5 + | +LL | 2isize.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:114:5 + | +LL | 2.0f32.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:115:5 + | +LL | 2.0f64.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:135:5 + | +LL | 2u8.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:136:5 + | +LL | 2i8.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:137:5 + | +LL | 2u16.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:138:5 + | +LL | 2i16.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:139:5 + | +LL | 2u32.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:140:5 + | +LL | 2i32.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:141:5 + | +LL | 2u64.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:142:5 + | +LL | 2i64.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:143:5 + | +LL | 2u128.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:144:5 + | +LL | 2i128.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:145:5 + | +LL | 2usize.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:146:5 + | +LL | 2isize.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:147:5 + | +LL | 2.0f32.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + +error: use of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:148:5 + | +LL | 2.0f64.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 145 previous errors + From 97a0ccc1d312ed763584c28b6d669cffba87c910 Mon Sep 17 00:00:00 2001 From: Centri3 <114838443+Centri3@users.noreply.github.com> Date: Thu, 25 May 2023 11:02:54 -0500 Subject: [PATCH 2/9] implement `host_endian_bytes` and the other two --- clippy_lints/src/endian_bytes.rs | 229 ++-- tests/ui/endian_bytes.rs | 260 ++-- tests/ui/endian_bytes.stderr | 1893 ++++++++++++++---------------- 3 files changed, 1142 insertions(+), 1240 deletions(-) diff --git a/clippy_lints/src/endian_bytes.rs b/clippy_lints/src/endian_bytes.rs index bf6b92644..6486430cf 100644 --- a/clippy_lints/src/endian_bytes.rs +++ b/clippy_lints/src/endian_bytes.rs @@ -1,29 +1,11 @@ -use clippy_utils::{ - diagnostics::{span_lint_and_help, span_lint_and_then}, - is_lint_allowed, match_def_path, path_def_id, -}; +use crate::Lint; +use clippy_utils::{diagnostics::span_lint_and_then, is_lint_allowed}; use rustc_hir::{Expr, ExprKind}; -use rustc_lint::{LateContext, LateLintPass}; +use rustc_lint::{LateContext, LateLintPass, LintContext}; +use rustc_middle::lint::in_external_macro; use rustc_session::{declare_lint_pass, declare_tool_lint}; - -declare_clippy_lint! { - /// ### What it does - /// - /// ### Why is this bad? - /// - /// ### Example - /// ```rust - /// // example code where clippy issues a warning - /// ``` - /// Use instead: - /// ```rust - /// // example code which does not raise clippy warning - /// ``` - #[clippy::version = "1.71.0"] - pub HOST_ENDIAN_BYTES, - restriction, - "disallows usage of the `to_ne_bytes` method" -} +use rustc_span::Symbol; +use std::borrow::Cow; declare_clippy_lint! { /// ### What it does @@ -38,9 +20,9 @@ declare_clippy_lint! { /// let _y = 2i64.to_ne_bytes(); /// ``` #[clippy::version = "1.71.0"] - pub LITTLE_ENDIAN_BYTES, + pub HOST_ENDIAN_BYTES, restriction, - "disallows usage of the `to_le_bytes` method" + "disallows usage of the `to_ne_bytes` method" } declare_clippy_lint! { @@ -48,10 +30,32 @@ declare_clippy_lint! { /// Checks for the usage of the `to_le_bytes` method. /// /// ### Why is this bad? + /// It's not, but some may wish to lint usages of this method, either to suggest using the host + /// endianness or big endian. /// /// ### Example /// ```rust,ignore - /// // example code where clippy issues a warning + /// let _x = 2i32.to_le_bytes(); + /// let _y = 2i64.to_le_bytes(); + /// ``` + #[clippy::version = "1.71.0"] + pub LITTLE_ENDIAN_BYTES, + restriction, + "disallows usage of the `to_le_bytes` method" +} + +declare_clippy_lint! { + /// ### What it does + /// Checks for the usage of the `to_be_bytes` method. + /// + /// ### Why is this bad? + /// It's not, but some may wish to lint usages of this method, either to suggest using the host + /// endianness or little endian. + /// + /// ### Example + /// ```rust,ignore + /// let _x = 2i32.to_be_bytes(); + /// let _y = 2i64.to_be_bytes(); /// ``` #[clippy::version = "1.71.0"] pub BIG_ENDIAN_BYTES, @@ -61,78 +65,133 @@ declare_clippy_lint! { declare_lint_pass!(EndianBytes => [HOST_ENDIAN_BYTES, LITTLE_ENDIAN_BYTES, BIG_ENDIAN_BYTES]); +#[derive(Clone, Debug)] +enum LintKind { + Host, + Little, + Big, +} + +impl LintKind { + fn allowed(&self, cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { + is_lint_allowed(cx, self.as_lint(), expr.hir_id) + } + + fn as_lint(&self) -> &'static Lint { + match self { + LintKind::Host => HOST_ENDIAN_BYTES, + LintKind::Little => LITTLE_ENDIAN_BYTES, + LintKind::Big => BIG_ENDIAN_BYTES, + } + } + + fn to_name(&self, prefix: &str) -> String { + match self { + LintKind::Host => format!("{prefix}_ne_bytes"), + LintKind::Little => format!("{prefix}_le_bytes"), + LintKind::Big => format!("{prefix}_be_bytes"), + } + } +} + impl LateLintPass<'_> for EndianBytes { fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { + if in_external_macro(cx.sess(), expr.span) { + return; + } + if_chain! { if let ExprKind::MethodCall(method_name, receiver, args, ..) = expr.kind; if let ExprKind::Lit(..) = receiver.kind; if args.is_empty(); + if try_lint_endian_bytes(cx, expr, "to", method_name.ident.name); then { - if method_name.ident.name == sym!(to_ne_bytes) { - span_lint_and_help( - cx, - HOST_ENDIAN_BYTES, - expr.span, - "use of the method `to_ne_bytes`", - None, - "consider specifying the desired endianness", - ); - } else if method_name.ident.name == sym!(to_le_bytes) { - span_lint_and_then(cx, LITTLE_ENDIAN_BYTES, expr.span, "use of the method `to_le_bytes`", |diag| { - if is_lint_allowed(cx, BIG_ENDIAN_BYTES, expr.hir_id) { - diag.help("use `to_be_bytes` instead"); - } - }); - } else if method_name.ident.name == sym!(to_be_bytes) { - span_lint_and_then(cx, BIG_ENDIAN_BYTES, expr.span, "use of the method `to_be_bytes`", |diag| { - if is_lint_allowed(cx, LITTLE_ENDIAN_BYTES, expr.hir_id) { - diag.help("use `to_le_bytes` instead"); - } - }); - } - - // don't waste time also checking from_**_bytes return; } } - span_lint_and_help( - cx, - HOST_ENDIAN_BYTES, - expr.span, - "use of the method `from_ne_bytes`", - None, - &format!("consider specifying the desired endianness: {expr:?}"), - ); - if_chain! { - if let ExprKind::Call(function, args) = expr.kind; - if let Some(function_def_id) = path_def_id(cx, function); - if args.len() == 1; + if let ExprKind::Call(function, ..) = expr.kind; + if let ExprKind::Path(qpath) = function.kind; + if let Some(def_id) = cx.qpath_res(&qpath, function.hir_id).opt_def_id(); + if let Some(function_name) = cx.get_def_path(def_id).last(); + if cx.typeck_results().expr_ty(expr).is_primitive_ty(); then { - if match_def_path(cx, function_def_id, &["from_ne_bytes"]) { - span_lint_and_help( - cx, - HOST_ENDIAN_BYTES, - expr.span, - "use of the method `from_ne_bytes`", - None, - "consider specifying the desired endianness", - ); - } else if match_def_path(cx, function_def_id, &["from_le_bytes"]) { - span_lint_and_then(cx, LITTLE_ENDIAN_BYTES, expr.span, "use of the method `from_le_bytes`", |diag| { - if is_lint_allowed(cx, BIG_ENDIAN_BYTES, expr.hir_id) { - diag.help("use `from_be_bytes` instead"); - } - }); - } else if match_def_path(cx, function_def_id, &["from_be_bytes"]) { - span_lint_and_then(cx, BIG_ENDIAN_BYTES, expr.span, "use of the method `from_be_bytes`", |diag| { - if is_lint_allowed(cx, LITTLE_ENDIAN_BYTES, expr.hir_id) { - diag.help("use `from_le_bytes` instead"); - } - }); - } + try_lint_endian_bytes(cx, expr, "from", *function_name); } } } } + +fn try_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &str, name: Symbol) -> bool { + let ne = format!("{prefix}_ne_bytes"); + let le = format!("{prefix}_le_bytes"); + let be = format!("{prefix}_be_bytes"); + + let (lint, other_lints) = match name.as_str() { + name if name == ne => ((&LintKind::Host), [(&LintKind::Little), (&LintKind::Big)]), + name if name == le => ((&LintKind::Little), [(&LintKind::Host), (&LintKind::Big)]), + name if name == be => ((&LintKind::Big), [(&LintKind::Host), (&LintKind::Little)]), + _ => return false, + }; + + let mut help = None; + + 'build_help: { + // all lints disallowed, don't give help here + if [&[lint], other_lints.as_slice()] + .concat() + .iter() + .all(|lint| !lint.allowed(cx, expr)) + { + break 'build_help; + } + + // ne_bytes and all other lints allowed + if lint.to_name(prefix) == ne && other_lints.iter().all(|lint| lint.allowed(cx, expr)) { + help = Some(Cow::Borrowed("specify the desired endianness explicitly")); + break 'build_help; + } + + // le_bytes where ne_bytes allowed but be_bytes is not, or le_bytes where ne_bytes allowed but + // le_bytes is not + if (lint.to_name(prefix) == le || lint.to_name(prefix) == be) && LintKind::Host.allowed(cx, expr) { + help = Some(Cow::Borrowed("use the native endianness instead")); + break 'build_help; + } + + let allowed_lints = other_lints.iter().filter(|lint| lint.allowed(cx, expr)); + let len = allowed_lints.clone().count(); + + let mut help_str = "use ".to_owned(); + + for (i, lint) in allowed_lints.enumerate() { + let only_one = len == 1; + if !only_one { + help_str.push_str("either of "); + } + + help_str.push_str(&format!("`{}` ", lint.to_name(prefix))); + + if i != len && !only_one { + help_str.push_str("or "); + } + } + + help = Some(Cow::Owned(help_str + "instead")); + } + + span_lint_and_then( + cx, + lint.as_lint(), + expr.span, + &format!("usage of the method `{}`", lint.to_name(prefix)), + move |diag| { + if let Some(help) = help { + diag.help(help); + } + }, + ); + + true +} diff --git a/tests/ui/endian_bytes.rs b/tests/ui/endian_bytes.rs index 1dfda9d53..ccee8e20a 100644 --- a/tests/ui/endian_bytes.rs +++ b/tests/ui/endian_bytes.rs @@ -2,162 +2,126 @@ #![allow(clippy::diverging_sub_expression)] #![no_main] +macro_rules! fn_body { + () => { + 2u8.to_ne_bytes(); + 2i8.to_ne_bytes(); + 2u16.to_ne_bytes(); + 2i16.to_ne_bytes(); + 2u32.to_ne_bytes(); + 2i32.to_ne_bytes(); + 2u64.to_ne_bytes(); + 2i64.to_ne_bytes(); + 2u128.to_ne_bytes(); + 2i128.to_ne_bytes(); + 2.0f32.to_ne_bytes(); + 2.0f64.to_ne_bytes(); + 2usize.to_ne_bytes(); + 2isize.to_ne_bytes(); + u8::from_ne_bytes(todo!()); + i8::from_ne_bytes(todo!()); + u16::from_ne_bytes(todo!()); + i16::from_ne_bytes(todo!()); + u32::from_ne_bytes(todo!()); + i32::from_ne_bytes(todo!()); + u64::from_ne_bytes(todo!()); + i64::from_ne_bytes(todo!()); + u128::from_ne_bytes(todo!()); + i128::from_ne_bytes(todo!()); + usize::from_ne_bytes(todo!()); + isize::from_ne_bytes(todo!()); + f32::from_ne_bytes(todo!()); + f64::from_ne_bytes(todo!()); + + 2u8.to_le_bytes(); + 2i8.to_le_bytes(); + 2u16.to_le_bytes(); + 2i16.to_le_bytes(); + 2u32.to_le_bytes(); + 2i32.to_le_bytes(); + 2u64.to_le_bytes(); + 2i64.to_le_bytes(); + 2u128.to_le_bytes(); + 2i128.to_le_bytes(); + 2.0f32.to_le_bytes(); + 2.0f64.to_le_bytes(); + 2usize.to_le_bytes(); + 2isize.to_le_bytes(); + u8::from_le_bytes(todo!()); + i8::from_le_bytes(todo!()); + u16::from_le_bytes(todo!()); + i16::from_le_bytes(todo!()); + u32::from_le_bytes(todo!()); + i32::from_le_bytes(todo!()); + u64::from_le_bytes(todo!()); + i64::from_le_bytes(todo!()); + u128::from_le_bytes(todo!()); + i128::from_le_bytes(todo!()); + usize::from_le_bytes(todo!()); + isize::from_le_bytes(todo!()); + f32::from_le_bytes(todo!()); + f64::from_le_bytes(todo!()); + }; +} + +// bless breaks if I use fn_body too much (oops) +macro_rules! fn_body_small { + () => { + 2u8.to_ne_bytes(); + u8::from_ne_bytes(todo!()); + + 2u8.to_le_bytes(); + u8::from_le_bytes(todo!()); + + 2u8.to_be_bytes(); + u8::from_be_bytes(todo!()); + }; +} + +#[rustfmt::skip] #[warn(clippy::host_endian_bytes)] -fn host() { - 2u8.to_ne_bytes(); - 2i8.to_ne_bytes(); - 2u16.to_ne_bytes(); - 2i16.to_ne_bytes(); - 2u32.to_ne_bytes(); - 2i32.to_ne_bytes(); - 2u64.to_ne_bytes(); - 2i64.to_ne_bytes(); - 2u128.to_ne_bytes(); - 2i128.to_ne_bytes(); - 2usize.to_ne_bytes(); - 2isize.to_ne_bytes(); - 2.0f32.to_ne_bytes(); - 2.0f64.to_ne_bytes(); - u8::from_ne_bytes(todo!()); - i8::from_ne_bytes(todo!()); - u16::from_ne_bytes(todo!()); - i16::from_ne_bytes(todo!()); - u32::from_ne_bytes(todo!()); - i32::from_ne_bytes(todo!()); - u64::from_ne_bytes(todo!()); - i64::from_ne_bytes(todo!()); - u128::from_ne_bytes(todo!()); - i128::from_ne_bytes(todo!()); - f32::from_ne_bytes(todo!()); - f64::from_ne_bytes(todo!()); -} +fn host() { fn_body!(); } +#[rustfmt::skip] #[warn(clippy::little_endian_bytes)] -fn little() { - 2u8.to_le_bytes(); - 2i8.to_le_bytes(); - 2u16.to_le_bytes(); - 2i16.to_le_bytes(); - 2u32.to_le_bytes(); - 2i32.to_le_bytes(); - 2u64.to_le_bytes(); - 2i64.to_le_bytes(); - 2u128.to_le_bytes(); - 2i128.to_le_bytes(); - 2usize.to_le_bytes(); - 2isize.to_le_bytes(); - 2.0f32.to_le_bytes(); - 2.0f64.to_le_bytes(); - u8::from_le_bytes(todo!()); - i8::from_le_bytes(todo!()); - u16::from_le_bytes(todo!()); - i16::from_le_bytes(todo!()); - u32::from_le_bytes(todo!()); - i32::from_le_bytes(todo!()); - u64::from_le_bytes(todo!()); - i64::from_le_bytes(todo!()); - u128::from_le_bytes(todo!()); - i128::from_le_bytes(todo!()); - usize::from_le_bytes(todo!()); - isize::from_le_bytes(todo!()); - f32::from_le_bytes(todo!()); - f64::from_le_bytes(todo!()); -} +fn little() { fn_body!(); } +#[rustfmt::skip] #[warn(clippy::big_endian_bytes)] -fn big() { - 2u8.to_be_bytes(); - 2i8.to_be_bytes(); - 2u16.to_be_bytes(); - 2i16.to_be_bytes(); - 2u32.to_be_bytes(); - 2i32.to_be_bytes(); - 2u64.to_be_bytes(); - 2i64.to_be_bytes(); - 2u128.to_be_bytes(); - 2i128.to_be_bytes(); - 2.0f32.to_be_bytes(); - 2.0f64.to_be_bytes(); - 2usize.to_be_bytes(); - 2isize.to_be_bytes(); - u8::from_be_bytes(todo!()); - i8::from_be_bytes(todo!()); - u16::from_be_bytes(todo!()); - i16::from_be_bytes(todo!()); - u32::from_be_bytes(todo!()); - i32::from_be_bytes(todo!()); - u64::from_be_bytes(todo!()); - i64::from_be_bytes(todo!()); - u128::from_be_bytes(todo!()); - i128::from_be_bytes(todo!()); - usize::from_be_bytes(todo!()); - isize::from_be_bytes(todo!()); - f32::from_be_bytes(todo!()); - f64::from_be_bytes(todo!()); -} +fn big() { fn_body!(); } +#[rustfmt::skip] +#[warn(clippy::host_endian_bytes)] +#[warn(clippy::big_endian_bytes)] +fn host_encourage_little() { fn_body_small!(); } + +#[rustfmt::skip] +#[warn(clippy::host_endian_bytes)] +#[warn(clippy::little_endian_bytes)] +fn host_encourage_big() { fn_body_small!(); } + +#[rustfmt::skip] +#[warn(clippy::host_endian_bytes)] #[warn(clippy::little_endian_bytes)] #[warn(clippy::big_endian_bytes)] -fn little_no_help() { - 2u8.to_le_bytes(); - 2i8.to_le_bytes(); - 2u16.to_le_bytes(); - 2i16.to_le_bytes(); - 2u32.to_le_bytes(); - 2i32.to_le_bytes(); - 2u64.to_le_bytes(); - 2i64.to_le_bytes(); - 2u128.to_le_bytes(); - 2i128.to_le_bytes(); - 2usize.to_le_bytes(); - 2isize.to_le_bytes(); - 2.0f32.to_le_bytes(); - 2.0f64.to_le_bytes(); - u8::from_le_bytes(todo!()); - i8::from_le_bytes(todo!()); - u16::from_le_bytes(todo!()); - i16::from_le_bytes(todo!()); - u32::from_le_bytes(todo!()); - i32::from_le_bytes(todo!()); - u64::from_le_bytes(todo!()); - i64::from_le_bytes(todo!()); - u128::from_le_bytes(todo!()); - i128::from_le_bytes(todo!()); - usize::from_le_bytes(todo!()); - isize::from_le_bytes(todo!()); - f32::from_le_bytes(todo!()); - f64::from_le_bytes(todo!()); -} +fn no_help() { fn_body_small!(); } +#[rustfmt::skip] +#[warn(clippy::little_endian_bytes)] +#[warn(clippy::big_endian_bytes)] +fn little_encourage_host() { fn_body_small!(); } + +#[rustfmt::skip] +#[warn(clippy::host_endian_bytes)] +#[warn(clippy::little_endian_bytes)] +fn little_encourage_big() { fn_body_small!(); } + +#[rustfmt::skip] #[warn(clippy::big_endian_bytes)] #[warn(clippy::little_endian_bytes)] -fn big_no_help() { - 2u8.to_be_bytes(); - 2i8.to_be_bytes(); - 2u16.to_be_bytes(); - 2i16.to_be_bytes(); - 2u32.to_be_bytes(); - 2i32.to_be_bytes(); - 2u64.to_be_bytes(); - 2i64.to_be_bytes(); - 2u128.to_be_bytes(); - 2i128.to_be_bytes(); - 2usize.to_be_bytes(); - 2isize.to_be_bytes(); - 2.0f32.to_be_bytes(); - 2.0f64.to_be_bytes(); - u8::from_be_bytes(todo!()); - i8::from_be_bytes(todo!()); - u16::from_be_bytes(todo!()); - i16::from_be_bytes(todo!()); - u32::from_be_bytes(todo!()); - i32::from_be_bytes(todo!()); - u64::from_be_bytes(todo!()); - i64::from_be_bytes(todo!()); - u128::from_be_bytes(todo!()); - i128::from_be_bytes(todo!()); - usize::from_be_bytes(todo!()); - isize::from_be_bytes(todo!()); - f32::from_be_bytes(todo!()); - f64::from_be_bytes(todo!()); -} +fn big_encourage_host() { fn_body_small!(); } + +#[rustfmt::skip] +#[warn(clippy::host_endian_bytes)] +#[warn(clippy::big_endian_bytes)] +fn big_encourage_little() { fn_body_small!(); } diff --git a/tests/ui/endian_bytes.stderr b/tests/ui/endian_bytes.stderr index afbb8e3b1..ff8d1a98f 100644 --- a/tests/ui/endian_bytes.stderr +++ b/tests/ui/endian_bytes.stderr @@ -1,1152 +1,1031 @@ -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:6:11 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:7:9 | -LL | fn host() { - | ___________^ -LL | | 2u8.to_ne_bytes(); -LL | | 2i8.to_ne_bytes(); -LL | | 2u16.to_ne_bytes(); -... | -LL | | f64::from_ne_bytes(todo!()); -LL | | } - | |_^ +LL | 2u8.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).202), kind: Block(Block { stmts: [Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).4), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).1), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).2), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).3), kind: Lit(Spanned { node: Int(2, Unsigned(U8)), span: $DIR/endian_bytes.rs:7:5: 7:8 (#0) }), span: $DIR/endian_bytes.rs:7:5: 7:8 (#0) }, [], $DIR/endian_bytes.rs:7:9: 7:22 (#0)), span: $DIR/endian_bytes.rs:7:5: 7:22 (#0) }), span: $DIR/endian_bytes.rs:7:5: 7:23 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).8), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).5), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).6), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).7), kind: Lit(Spanned { node: Int(2, Signed(I8)), span: $DIR/endian_bytes.rs:8:5: 8:8 (#0) }), span: $DIR/endian_bytes.rs:8:5: 8:8 (#0) }, [], $DIR/endian_bytes.rs:8:9: 8:22 (#0)), span: $DIR/endian_bytes.rs:8:5: 8:22 (#0) }), span: $DIR/endian_bytes.rs:8:5: 8:23 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).12), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).9), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).10), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).11), kind: Lit(Spanned { node: Int(2, Unsigned(U16)), span: $DIR/endian_bytes.rs:9:5: 9:9 (#0) }), span: $DIR/endian_bytes.rs:9:5: 9:9 (#0) }, [], $DIR/endian_bytes.rs:9:10: 9:23 (#0)), span: $DIR/endian_bytes.rs:9:5: 9:23 (#0) }), span: $DIR/endian_bytes.rs:9:5: 9:24 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).16), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).13), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).14), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).15), kind: Lit(Spanned { node: Int(2, Signed(I16)), span: $DIR/endian_bytes.rs:10:5: 10:9 (#0) }), span: $DIR/endian_bytes.rs:10:5: 10:9 (#0) }, [], $DIR/endian_bytes.rs:10:10: 10:23 (#0)), span: $DIR/endian_bytes.rs:10:5: 10:23 (#0) }), span: $DIR/endian_bytes.rs:10:5: 10:24 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).20), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).17), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).18), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).19), kind: Lit(Spanned { node: Int(2, Unsigned(U32)), span: $DIR/endian_bytes.rs:11:5: 11:9 (#0) }), span: $DIR/endian_bytes.rs:11:5: 11:9 (#0) }, [], $DIR/endian_bytes.rs:11:10: 11:23 (#0)), span: $DIR/endian_bytes.rs:11:5: 11:23 (#0) }), span: $DIR/endian_bytes.rs:11:5: 11:24 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).24), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).21), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).22), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).23), kind: Lit(Spanned { node: Int(2, Signed(I32)), span: $DIR/endian_bytes.rs:12:5: 12:9 (#0) }), span: $DIR/endian_bytes.rs:12:5: 12:9 (#0) }, [], $DIR/endian_bytes.rs:12:10: 12:23 (#0)), span: $DIR/endian_bytes.rs:12:5: 12:23 (#0) }), span: $DIR/endian_bytes.rs:12:5: 12:24 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).28), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).25), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).26), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).27), kind: Lit(Spanned { node: Int(2, Unsigned(U64)), span: $DIR/endian_bytes.rs:13:5: 13:9 (#0) }), span: $DIR/endian_bytes.rs:13:5: 13:9 (#0) }, [], $DIR/endian_bytes.rs:13:10: 13:23 (#0)), span: $DIR/endian_bytes.rs:13:5: 13:23 (#0) }), span: $DIR/endian_bytes.rs:13:5: 13:24 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).32), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).29), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).30), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).31), kind: Lit(Spanned { node: Int(2, Signed(I64)), span: $DIR/endian_bytes.rs:14:5: 14:9 (#0) }), span: $DIR/endian_bytes.rs:14:5: 14:9 (#0) }, [], $DIR/endian_bytes.rs:14:10: 14:23 (#0)), span: $DIR/endian_bytes.rs:14:5: 14:23 (#0) }), span: $DIR/endian_bytes.rs:14:5: 14:24 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).36), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).33), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).34), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).35), kind: Lit(Spanned { node: Int(2, Unsigned(U128)), span: $DIR/endian_bytes.rs:15:5: 15:10 (#0) }), span: $DIR/endian_bytes.rs:15:5: 15:10 (#0) }, [], $DIR/endian_bytes.rs:15:11: 15:24 (#0)), span: $DIR/endian_bytes.rs:15:5: 15:24 (#0) }), span: $DIR/endian_bytes.rs:15:5: 15:25 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).40), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).37), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).38), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).39), kind: Lit(Spanned { node: Int(2, Signed(I128)), span: $DIR/endian_bytes.rs:16:5: 16:10 (#0) }), span: $DIR/endian_bytes.rs:16:5: 16:10 (#0) }, [], $DIR/endian_bytes.rs:16:11: 16:24 (#0)), span: $DIR/endian_bytes.rs:16:5: 16:24 (#0) }), span: $DIR/endian_bytes.rs:16:5: 16:25 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).44), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).41), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).42), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).43), kind: Lit(Spanned { node: Int(2, Unsigned(Usize)), span: $DIR/endian_bytes.rs:17:5: 17:11 (#0) }), span: $DIR/endian_bytes.rs:17:5: 17:11 (#0) }, [], $DIR/endian_bytes.rs:17:12: 17:25 (#0)), span: $DIR/endian_bytes.rs:17:5: 17:25 (#0) }), span: $DIR/endian_bytes.rs:17:5: 17:26 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).48), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).45), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).46), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).47), kind: Lit(Spanned { node: Int(2, Signed(Isize)), span: $DIR/endian_bytes.rs:18:5: 18:11 (#0) }), span: $DIR/endian_bytes.rs:18:5: 18:11 (#0) }, [], $DIR/endian_bytes.rs:18:12: 18:25 (#0)), span: $DIR/endian_bytes.rs:18:5: 18:25 (#0) }), span: $DIR/endian_bytes.rs:18:5: 18:26 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).52), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).49), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).50), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).51), kind: Lit(Spanned { node: Float("2.0", Suffixed(F32)), span: $DIR/endian_bytes.rs:19:5: 19:11 (#0) }), span: $DIR/endian_bytes.rs:19:5: 19:11 (#0) }, [], $DIR/endian_bytes.rs:19:12: 19:25 (#0)), span: $DIR/endian_bytes.rs:19:5: 19:25 (#0) }), span: $DIR/endian_bytes.rs:19:5: 19:26 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).56), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).53), kind: MethodCall(PathSegment { ident: to_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).54), res: Err, args: None, infer_args: true }, Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).55), kind: Lit(Spanned { node: Float("2.0", Suffixed(F64)), span: $DIR/endian_bytes.rs:20:5: 20:11 (#0) }), span: $DIR/endian_bytes.rs:20:5: 20:11 (#0) }, [], $DIR/endian_bytes.rs:20:12: 20:25 (#0)), span: $DIR/endian_bytes.rs:20:5: 20:25 (#0) }), span: $DIR/endian_bytes.rs:20:5: 20:26 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).68), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).57), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).58), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).60), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:21:5: 21:7 (#0), res: PrimTy(Uint(U8)), segments: [PathSegment { ident: u8#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).59), res: PrimTy(Uint(U8)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:21:5: 21:7 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).61), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:21:5: 21:22 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).62), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).63), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).64), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).65), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).66), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).67), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#4) }]), span: $DIR/endian_bytes.rs:21:5: 21:31 (#0) }), span: $DIR/endian_bytes.rs:21:5: 21:32 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).80), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).69), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).70), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).72), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:22:5: 22:7 (#0), res: PrimTy(Int(I8)), segments: [PathSegment { ident: i8#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).71), res: PrimTy(Int(I8)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:22:5: 22:7 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).73), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:22:5: 22:22 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).74), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).75), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).76), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).77), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).78), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).79), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#5) }]), span: $DIR/endian_bytes.rs:22:5: 22:31 (#0) }), span: $DIR/endian_bytes.rs:22:5: 22:32 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).92), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).81), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).82), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).84), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:23:5: 23:8 (#0), res: PrimTy(Uint(U16)), segments: [PathSegment { ident: u16#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).83), res: PrimTy(Uint(U16)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:23:5: 23:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).85), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:23:5: 23:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).86), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).87), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).88), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).89), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).90), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).91), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#6) }]), span: $DIR/endian_bytes.rs:23:5: 23:32 (#0) }), span: $DIR/endian_bytes.rs:23:5: 23:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).104), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).93), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).94), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).96), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:24:5: 24:8 (#0), res: PrimTy(Int(I16)), segments: [PathSegment { ident: i16#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).95), res: PrimTy(Int(I16)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:24:5: 24:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).97), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:24:5: 24:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).98), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).99), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).100), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).101), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).102), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).103), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#7) }]), span: $DIR/endian_bytes.rs:24:5: 24:32 (#0) }), span: $DIR/endian_bytes.rs:24:5: 24:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).116), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).105), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).106), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).108), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:25:5: 25:8 (#0), res: PrimTy(Uint(U32)), segments: [PathSegment { ident: u32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).107), res: PrimTy(Uint(U32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:25:5: 25:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).109), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:25:5: 25:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).110), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).111), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).112), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).113), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).114), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).115), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#8) }]), span: $DIR/endian_bytes.rs:25:5: 25:32 (#0) }), span: $DIR/endian_bytes.rs:25:5: 25:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).128), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).117), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).118), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).120), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:26:5: 26:8 (#0), res: PrimTy(Int(I32)), segments: [PathSegment { ident: i32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).119), res: PrimTy(Int(I32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:26:5: 26:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).121), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:26:5: 26:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).122), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).123), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).124), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).125), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).126), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).127), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#9) }]), span: $DIR/endian_bytes.rs:26:5: 26:32 (#0) }), span: $DIR/endian_bytes.rs:26:5: 26:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).140), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).129), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).130), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).132), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:27:5: 27:8 (#0), res: PrimTy(Uint(U64)), segments: [PathSegment { ident: u64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).131), res: PrimTy(Uint(U64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:27:5: 27:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).133), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:27:5: 27:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).134), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).135), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).136), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).137), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).138), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).139), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#10) }]), span: $DIR/endian_bytes.rs:27:5: 27:32 (#0) }), span: $DIR/endian_bytes.rs:27:5: 27:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).152), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).141), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).142), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).144), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:28:5: 28:8 (#0), res: PrimTy(Int(I64)), segments: [PathSegment { ident: i64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).143), res: PrimTy(Int(I64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:28:5: 28:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).145), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:28:5: 28:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).146), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).147), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).148), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).149), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).150), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).151), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#11) }]), span: $DIR/endian_bytes.rs:28:5: 28:32 (#0) }), span: $DIR/endian_bytes.rs:28:5: 28:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).164), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).153), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).154), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).156), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:29:5: 29:9 (#0), res: PrimTy(Uint(U128)), segments: [PathSegment { ident: u128#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).155), res: PrimTy(Uint(U128)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:29:5: 29:9 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).157), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:29:5: 29:24 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).158), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).159), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).160), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).161), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).162), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).163), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#12) }]), span: $DIR/endian_bytes.rs:29:5: 29:33 (#0) }), span: $DIR/endian_bytes.rs:29:5: 29:34 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).176), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).165), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).166), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).168), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:30:5: 30:9 (#0), res: PrimTy(Int(I128)), segments: [PathSegment { ident: i128#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).167), res: PrimTy(Int(I128)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:30:5: 30:9 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).169), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:30:5: 30:24 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).170), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).171), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).172), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).173), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).174), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).175), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#13) }]), span: $DIR/endian_bytes.rs:30:5: 30:33 (#0) }), span: $DIR/endian_bytes.rs:30:5: 30:34 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).188), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).177), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).178), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).180), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:31:5: 31:8 (#0), res: PrimTy(Float(F32)), segments: [PathSegment { ident: f32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).179), res: PrimTy(Float(F32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:31:5: 31:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).181), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:31:5: 31:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).182), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).183), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).184), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).185), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).186), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).187), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#14) }]), span: $DIR/endian_bytes.rs:31:5: 31:32 (#0) }), span: $DIR/endian_bytes.rs:31:5: 31:33 (#0) }, Stmt { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).200), kind: Semi(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).189), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).190), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).192), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:32:5: 32:8 (#0), res: PrimTy(Float(F64)), segments: [PathSegment { ident: f64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).191), res: PrimTy(Float(F64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:32:5: 32:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).193), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:32:5: 32:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).194), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).195), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).196), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).197), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).198), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).199), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#15) }]), span: $DIR/endian_bytes.rs:32:5: 32:32 (#0) }), span: $DIR/endian_bytes.rs:32:5: 32:33 (#0) }], expr: None, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).201), rules: DefaultBlock, span: $DIR/endian_bytes.rs:6:11: 33:2 (#0), targeted_by_break: false }, None), span: $DIR/endian_bytes.rs:6:11: 33:2 (#0) } + = help: specify the desired endianness explicitly = note: `-D clippy::host-endian-bytes` implied by `-D warnings` + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:7:5 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:8:9 | -LL | 2u8.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^ +LL | 2i8.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:7:5 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:9:9 | -LL | 2u8.to_ne_bytes(); - | ^^^ +LL | 2u16.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).3), kind: Lit(Spanned { node: Int(2, Unsigned(U8)), span: $DIR/endian_bytes.rs:7:5: 7:8 (#0) }), span: $DIR/endian_bytes.rs:7:5: 7:8 (#0) } + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:8:5 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:10:9 | -LL | 2i8.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^ +LL | 2i16.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:8:5 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:11:9 | -LL | 2i8.to_ne_bytes(); - | ^^^ +LL | 2u32.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).7), kind: Lit(Spanned { node: Int(2, Signed(I8)), span: $DIR/endian_bytes.rs:8:5: 8:8 (#0) }), span: $DIR/endian_bytes.rs:8:5: 8:8 (#0) } + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:9:5 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:12:9 | -LL | 2u16.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | 2i32.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:9:5 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:13:9 | -LL | 2u16.to_ne_bytes(); - | ^^^^ +LL | 2u64.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).11), kind: Lit(Spanned { node: Int(2, Unsigned(U16)), span: $DIR/endian_bytes.rs:9:5: 9:9 (#0) }), span: $DIR/endian_bytes.rs:9:5: 9:9 (#0) } + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:10:5 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:14:9 | -LL | 2i16.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | 2i64.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:10:5 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:15:9 | -LL | 2i16.to_ne_bytes(); - | ^^^^ +LL | 2u128.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).15), kind: Lit(Spanned { node: Int(2, Signed(I16)), span: $DIR/endian_bytes.rs:10:5: 10:9 (#0) }), span: $DIR/endian_bytes.rs:10:5: 10:9 (#0) } + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:11:5 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:16:9 | -LL | 2u32.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | 2i128.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:11:5 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:17:9 | -LL | 2u32.to_ne_bytes(); - | ^^^^ +LL | 2.0f32.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).19), kind: Lit(Spanned { node: Int(2, Unsigned(U32)), span: $DIR/endian_bytes.rs:11:5: 11:9 (#0) }), span: $DIR/endian_bytes.rs:11:5: 11:9 (#0) } + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:12:5 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:18:9 | -LL | 2i32.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | 2.0f64.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:12:5 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:19:9 | -LL | 2i32.to_ne_bytes(); - | ^^^^ +LL | 2usize.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).23), kind: Lit(Spanned { node: Int(2, Signed(I32)), span: $DIR/endian_bytes.rs:12:5: 12:9 (#0) }), span: $DIR/endian_bytes.rs:12:5: 12:9 (#0) } + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:13:5 +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:20:9 | -LL | 2u64.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | 2isize.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:13:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:21:9 | -LL | 2u64.to_ne_bytes(); - | ^^^^ +LL | u8::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).27), kind: Lit(Spanned { node: Int(2, Unsigned(U64)), span: $DIR/endian_bytes.rs:13:5: 13:9 (#0) }), span: $DIR/endian_bytes.rs:13:5: 13:9 (#0) } + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:14:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:22:9 | -LL | 2i64.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | i8::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:14:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:23:9 | -LL | 2i64.to_ne_bytes(); - | ^^^^ +LL | u16::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).31), kind: Lit(Spanned { node: Int(2, Signed(I64)), span: $DIR/endian_bytes.rs:14:5: 14:9 (#0) }), span: $DIR/endian_bytes.rs:14:5: 14:9 (#0) } + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:15:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:24:9 | -LL | 2u128.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^^^ +LL | i16::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:15:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:25:9 | -LL | 2u128.to_ne_bytes(); - | ^^^^^ +LL | u32::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).35), kind: Lit(Spanned { node: Int(2, Unsigned(U128)), span: $DIR/endian_bytes.rs:15:5: 15:10 (#0) }), span: $DIR/endian_bytes.rs:15:5: 15:10 (#0) } + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:16:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:26:9 | -LL | 2i128.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^^^ +LL | i32::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:16:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:27:9 | -LL | 2i128.to_ne_bytes(); - | ^^^^^ +LL | u64::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).39), kind: Lit(Spanned { node: Int(2, Signed(I128)), span: $DIR/endian_bytes.rs:16:5: 16:10 (#0) }), span: $DIR/endian_bytes.rs:16:5: 16:10 (#0) } + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:17:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:28:9 | -LL | 2usize.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ +LL | i64::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:17:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:29:9 | -LL | 2usize.to_ne_bytes(); - | ^^^^^^ +LL | u128::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).43), kind: Lit(Spanned { node: Int(2, Unsigned(Usize)), span: $DIR/endian_bytes.rs:17:5: 17:11 (#0) }), span: $DIR/endian_bytes.rs:17:5: 17:11 (#0) } + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:18:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:30:9 | -LL | 2isize.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ +LL | i128::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:18:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:31:9 | -LL | 2isize.to_ne_bytes(); - | ^^^^^^ +LL | usize::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).47), kind: Lit(Spanned { node: Int(2, Signed(Isize)), span: $DIR/endian_bytes.rs:18:5: 18:11 (#0) }), span: $DIR/endian_bytes.rs:18:5: 18:11 (#0) } + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:19:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:32:9 | -LL | 2.0f32.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ +LL | isize::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:19:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:33:9 | -LL | 2.0f32.to_ne_bytes(); - | ^^^^^^ +LL | f32::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).51), kind: Lit(Spanned { node: Float("2.0", Suffixed(F32)), span: $DIR/endian_bytes.rs:19:5: 19:11 (#0) }), span: $DIR/endian_bytes.rs:19:5: 19:11 (#0) } + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_ne_bytes` - --> $DIR/endian_bytes.rs:20:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:34:9 | -LL | 2.0f64.to_ne_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ +LL | f64::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness + = help: specify the desired endianness explicitly + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:20:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:36:9 | -LL | 2.0f64.to_ne_bytes(); - | ^^^^^^ +LL | 2u8.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).55), kind: Lit(Spanned { node: Float("2.0", Suffixed(F64)), span: $DIR/endian_bytes.rs:20:5: 20:11 (#0) }), span: $DIR/endian_bytes.rs:20:5: 20:11 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:21:5 - | -LL | u8::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).57), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).58), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).60), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:21:5: 21:7 (#0), res: PrimTy(Uint(U8)), segments: [PathSegment { ident: u8#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).59), res: PrimTy(Uint(U8)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:21:5: 21:7 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).61), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:21:5: 21:22 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).62), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).63), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).64), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).65), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).66), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).67), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#4) }]), span: $DIR/endian_bytes.rs:21:5: 21:31 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:21:5 - | -LL | u8::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).58), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).60), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:21:5: 21:7 (#0), res: PrimTy(Uint(U8)), segments: [PathSegment { ident: u8#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).59), res: PrimTy(Uint(U8)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:21:5: 21:7 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).61), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:21:5: 21:22 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:21:23 - | -LL | u8::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).62), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).63), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).64), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).65), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).66), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).67), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#4) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:21:23 - | -LL | u8::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).63), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).64), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).65), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#4, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).66), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#4) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:21:23 - | -LL | u8::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).67), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#4) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:22:5 - | -LL | i8::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).69), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).70), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).72), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:22:5: 22:7 (#0), res: PrimTy(Int(I8)), segments: [PathSegment { ident: i8#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).71), res: PrimTy(Int(I8)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:22:5: 22:7 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).73), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:22:5: 22:22 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).74), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).75), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).76), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).77), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).78), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).79), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#5) }]), span: $DIR/endian_bytes.rs:22:5: 22:31 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:22:5 - | -LL | i8::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).70), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).72), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:22:5: 22:7 (#0), res: PrimTy(Int(I8)), segments: [PathSegment { ident: i8#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).71), res: PrimTy(Int(I8)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:22:5: 22:7 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).73), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:22:5: 22:22 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:22:23 - | -LL | i8::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).74), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).75), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).76), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).77), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).78), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).79), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#5) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:22:23 - | -LL | i8::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).75), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).76), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).77), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#5, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).78), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#5) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:22:23 - | -LL | i8::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).79), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#5) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:23:5 - | -LL | u16::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).81), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).82), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).84), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:23:5: 23:8 (#0), res: PrimTy(Uint(U16)), segments: [PathSegment { ident: u16#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).83), res: PrimTy(Uint(U16)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:23:5: 23:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).85), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:23:5: 23:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).86), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).87), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).88), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).89), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).90), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).91), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#6) }]), span: $DIR/endian_bytes.rs:23:5: 23:32 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:23:5 - | -LL | u16::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).82), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).84), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:23:5: 23:8 (#0), res: PrimTy(Uint(U16)), segments: [PathSegment { ident: u16#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).83), res: PrimTy(Uint(U16)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:23:5: 23:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).85), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:23:5: 23:23 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:23:24 - | -LL | u16::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).86), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).87), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).88), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).89), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).90), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).91), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#6) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:23:24 - | -LL | u16::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).87), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).88), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).89), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#6, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).90), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#6) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:23:24 - | -LL | u16::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).91), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#6) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:24:5 - | -LL | i16::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).93), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).94), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).96), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:24:5: 24:8 (#0), res: PrimTy(Int(I16)), segments: [PathSegment { ident: i16#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).95), res: PrimTy(Int(I16)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:24:5: 24:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).97), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:24:5: 24:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).98), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).99), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).100), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).101), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).102), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).103), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#7) }]), span: $DIR/endian_bytes.rs:24:5: 24:32 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:24:5 - | -LL | i16::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).94), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).96), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:24:5: 24:8 (#0), res: PrimTy(Int(I16)), segments: [PathSegment { ident: i16#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).95), res: PrimTy(Int(I16)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:24:5: 24:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).97), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:24:5: 24:23 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:24:24 - | -LL | i16::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).98), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).99), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).100), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).101), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).102), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).103), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#7) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:24:24 - | -LL | i16::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).99), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).100), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).101), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#7, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).102), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#7) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:24:24 - | -LL | i16::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).103), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#7) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:25:5 - | -LL | u32::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).105), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).106), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).108), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:25:5: 25:8 (#0), res: PrimTy(Uint(U32)), segments: [PathSegment { ident: u32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).107), res: PrimTy(Uint(U32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:25:5: 25:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).109), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:25:5: 25:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).110), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).111), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).112), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).113), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).114), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).115), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#8) }]), span: $DIR/endian_bytes.rs:25:5: 25:32 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:25:5 - | -LL | u32::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).106), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).108), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:25:5: 25:8 (#0), res: PrimTy(Uint(U32)), segments: [PathSegment { ident: u32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).107), res: PrimTy(Uint(U32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:25:5: 25:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).109), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:25:5: 25:23 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:25:24 - | -LL | u32::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).110), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).111), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).112), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).113), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).114), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).115), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#8) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:25:24 - | -LL | u32::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).111), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).112), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).113), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#8, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).114), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#8) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:25:24 - | -LL | u32::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).115), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#8) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:26:5 - | -LL | i32::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).117), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).118), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).120), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:26:5: 26:8 (#0), res: PrimTy(Int(I32)), segments: [PathSegment { ident: i32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).119), res: PrimTy(Int(I32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:26:5: 26:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).121), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:26:5: 26:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).122), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).123), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).124), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).125), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).126), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).127), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#9) }]), span: $DIR/endian_bytes.rs:26:5: 26:32 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:26:5 - | -LL | i32::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).118), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).120), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:26:5: 26:8 (#0), res: PrimTy(Int(I32)), segments: [PathSegment { ident: i32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).119), res: PrimTy(Int(I32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:26:5: 26:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).121), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:26:5: 26:23 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:26:24 - | -LL | i32::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).122), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).123), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).124), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).125), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).126), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).127), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#9) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:26:24 - | -LL | i32::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).123), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).124), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).125), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#9, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).126), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#9) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:26:24 - | -LL | i32::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).127), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#9) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:27:5 - | -LL | u64::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).129), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).130), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).132), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:27:5: 27:8 (#0), res: PrimTy(Uint(U64)), segments: [PathSegment { ident: u64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).131), res: PrimTy(Uint(U64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:27:5: 27:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).133), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:27:5: 27:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).134), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).135), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).136), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).137), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).138), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).139), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#10) }]), span: $DIR/endian_bytes.rs:27:5: 27:32 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:27:5 - | -LL | u64::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).130), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).132), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:27:5: 27:8 (#0), res: PrimTy(Uint(U64)), segments: [PathSegment { ident: u64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).131), res: PrimTy(Uint(U64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:27:5: 27:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).133), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:27:5: 27:23 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:27:24 - | -LL | u64::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).134), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).135), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).136), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).137), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).138), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).139), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#10) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:27:24 - | -LL | u64::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).135), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).136), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).137), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#10, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).138), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#10) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:27:24 - | -LL | u64::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).139), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#10) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:28:5 - | -LL | i64::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).141), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).142), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).144), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:28:5: 28:8 (#0), res: PrimTy(Int(I64)), segments: [PathSegment { ident: i64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).143), res: PrimTy(Int(I64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:28:5: 28:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).145), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:28:5: 28:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).146), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).147), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).148), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).149), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).150), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).151), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#11) }]), span: $DIR/endian_bytes.rs:28:5: 28:32 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:28:5 - | -LL | i64::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).142), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).144), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:28:5: 28:8 (#0), res: PrimTy(Int(I64)), segments: [PathSegment { ident: i64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).143), res: PrimTy(Int(I64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:28:5: 28:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).145), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:28:5: 28:23 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:28:24 - | -LL | i64::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).146), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).147), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).148), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).149), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).150), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).151), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#11) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:28:24 - | -LL | i64::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).147), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).148), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).149), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#11, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).150), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#11) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:28:24 - | -LL | i64::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).151), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#11) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:29:5 - | -LL | u128::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).153), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).154), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).156), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:29:5: 29:9 (#0), res: PrimTy(Uint(U128)), segments: [PathSegment { ident: u128#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).155), res: PrimTy(Uint(U128)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:29:5: 29:9 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).157), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:29:5: 29:24 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).158), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).159), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).160), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).161), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).162), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).163), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#12) }]), span: $DIR/endian_bytes.rs:29:5: 29:33 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:29:5 - | -LL | u128::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).154), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).156), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:29:5: 29:9 (#0), res: PrimTy(Uint(U128)), segments: [PathSegment { ident: u128#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).155), res: PrimTy(Uint(U128)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:29:5: 29:9 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).157), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:29:5: 29:24 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:29:25 - | -LL | u128::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).158), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).159), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).160), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).161), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).162), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).163), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#12) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:29:25 - | -LL | u128::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).159), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).160), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).161), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#12, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).162), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#12) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:29:25 - | -LL | u128::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).163), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#12) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:30:5 - | -LL | i128::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).165), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).166), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).168), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:30:5: 30:9 (#0), res: PrimTy(Int(I128)), segments: [PathSegment { ident: i128#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).167), res: PrimTy(Int(I128)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:30:5: 30:9 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).169), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:30:5: 30:24 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).170), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).171), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).172), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).173), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).174), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).175), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#13) }]), span: $DIR/endian_bytes.rs:30:5: 30:33 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:30:5 - | -LL | i128::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).166), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).168), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:30:5: 30:9 (#0), res: PrimTy(Int(I128)), segments: [PathSegment { ident: i128#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).167), res: PrimTy(Int(I128)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:30:5: 30:9 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).169), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:30:5: 30:24 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:30:25 - | -LL | i128::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).170), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).171), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).172), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).173), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).174), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).175), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#13) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:30:25 - | -LL | i128::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).171), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).172), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).173), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#13, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).174), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#13) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:30:25 - | -LL | i128::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).175), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#13) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:31:5 - | -LL | f32::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).177), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).178), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).180), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:31:5: 31:8 (#0), res: PrimTy(Float(F32)), segments: [PathSegment { ident: f32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).179), res: PrimTy(Float(F32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:31:5: 31:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).181), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:31:5: 31:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).182), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).183), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).184), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).185), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).186), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).187), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#14) }]), span: $DIR/endian_bytes.rs:31:5: 31:32 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:31:5 - | -LL | f32::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).178), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).180), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:31:5: 31:8 (#0), res: PrimTy(Float(F32)), segments: [PathSegment { ident: f32#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).179), res: PrimTy(Float(F32)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:31:5: 31:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).181), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:31:5: 31:23 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:31:24 - | -LL | f32::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).182), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).183), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).184), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).185), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).186), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).187), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#14) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:31:24 - | -LL | f32::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).183), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).184), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).185), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#14, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).186), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#14) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:31:24 - | -LL | f32::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).187), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#14) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:32:5 - | -LL | f64::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).189), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).190), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).192), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:32:5: 32:8 (#0), res: PrimTy(Float(F64)), segments: [PathSegment { ident: f64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).191), res: PrimTy(Float(F64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:32:5: 32:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).193), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:32:5: 32:23 (#0) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).194), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).195), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).196), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).197), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).198), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).199), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#15) }]), span: $DIR/endian_bytes.rs:32:5: 32:32 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:32:5 - | -LL | f64::from_ne_bytes(todo!()); - | ^^^^^^^^^^^^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).190), kind: Path(TypeRelative(Ty { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).192), kind: Path(Resolved(None, Path { span: $DIR/endian_bytes.rs:32:5: 32:8 (#0), res: PrimTy(Float(F64)), segments: [PathSegment { ident: f64#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).191), res: PrimTy(Float(F64)), args: None, infer_args: true }] })), span: $DIR/endian_bytes.rs:32:5: 32:8 (#0) }, PathSegment { ident: from_ne_bytes#0, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).193), res: Err, args: None, infer_args: true })), span: $DIR/endian_bytes.rs:32:5: 32:23 (#0) } - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:32:24 - | -LL | f64::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).194), kind: Call(Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).195), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).196), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).197), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).198), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15) }, [Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).199), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }]), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:56 (#15) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:32:24 - | -LL | f64::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).195), kind: Path(Resolved(None, Path { span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), segments: [PathSegment { ident: $crate#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).196), res: Err, args: None, infer_args: true }, PathSegment { ident: panicking#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).197), res: Def(Mod, DefId(2:8281 ~ core[690e]::panicking)), args: None, infer_args: true }, PathSegment { ident: panic#15, hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).198), res: Def(Fn, DefId(2:8292 ~ core[690e]::panicking::panic)), args: None, infer_args: true }] })), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:9: 773:33 (#15) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `from_ne_bytes` - --> $DIR/endian_bytes.rs:32:24 - | -LL | f64::from_ne_bytes(todo!()); - | ^^^^^^^ - | - = help: consider specifying the desired endianness: Expr { hir_id: HirId(DefId(0:3 ~ endian_bytes[6e38]::host).199), kind: Lit(Spanned { node: Str("not yet implemented", Cooked), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) }), span: /home/centri/.rustup/toolchains/nightly-2023-05-05-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:773:34: 773:55 (#15) } - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:37:5 - | -LL | 2u8.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^ - | - = help: use `to_be_bytes` instead + = help: use the native endianness instead = note: `-D clippy::little-endian-bytes` implied by `-D warnings` + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:38:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:37:9 | -LL | 2i8.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^ +LL | 2i8.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: use `to_be_bytes` instead + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:39:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:38:9 | -LL | 2u16.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | 2u16.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: use `to_be_bytes` instead + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:40:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:39:9 | -LL | 2i16.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | 2i16.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: use `to_be_bytes` instead + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:41:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:40:9 | -LL | 2u32.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | 2u32.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: use `to_be_bytes` instead + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:42:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:41:9 | -LL | 2i32.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | 2i32.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: use `to_be_bytes` instead + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:43:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:42:9 | -LL | 2u64.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | 2u64.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: use `to_be_bytes` instead + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:44:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:43:9 | -LL | 2i64.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | 2i64.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: use `to_be_bytes` instead + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:45:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:44:9 | -LL | 2u128.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^^ +LL | 2u128.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: use `to_be_bytes` instead + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:46:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:45:9 | -LL | 2i128.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^^ +LL | 2i128.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: use `to_be_bytes` instead + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:47:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:46:9 | -LL | 2usize.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ +LL | 2.0f32.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: use `to_be_bytes` instead + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:48:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:47:9 | -LL | 2isize.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ +LL | 2.0f64.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: use `to_be_bytes` instead + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:49:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:48:9 | -LL | 2.0f32.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ +LL | 2usize.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: use `to_be_bytes` instead + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:50:5 +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:49:9 | -LL | 2.0f64.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ +LL | 2isize.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation | - = help: use `to_be_bytes` instead + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:69:5 +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:50:9 | -LL | 2u8.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^ +LL | u8::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:51:9 + | +LL | i8::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:52:9 + | +LL | u16::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:53:9 + | +LL | i16::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:54:9 + | +LL | u32::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:55:9 + | +LL | i32::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:56:9 + | +LL | u64::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:57:9 + | +LL | i64::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:58:9 + | +LL | u128::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:59:9 + | +LL | i128::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:60:9 + | +LL | usize::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:61:9 + | +LL | isize::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:62:9 + | +LL | f32::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:63:9 + | +LL | f64::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little() { fn_body!(); } + | ---------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:70:9 + | +LL | 2u8.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn host_encourage_little() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use `to_le_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:71:9 + | +LL | u8::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host_encourage_little() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use `from_le_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:76:9 + | +LL | 2u8.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn host_encourage_little() { fn_body_small!(); } + | ---------------- in this macro invocation | = help: use `to_le_bytes` instead = note: `-D clippy::big-endian-bytes` implied by `-D warnings` + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:70:5 +error: usage of the method `from_be_bytes` + --> $DIR/endian_bytes.rs:77:9 | -LL | 2i8.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^ +LL | u8::from_be_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host_encourage_little() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use `from_le_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:70:9 + | +LL | 2u8.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn host_encourage_big() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use `to_be_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:71:9 + | +LL | u8::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host_encourage_big() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use `from_be_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:73:9 + | +LL | 2u8.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn host_encourage_big() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use `to_be_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:74:9 + | +LL | u8::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn host_encourage_big() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use `from_be_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:70:9 + | +LL | 2u8.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn no_help() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:71:9 + | +LL | u8::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn no_help() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:73:9 + | +LL | 2u8.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn no_help() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:74:9 + | +LL | u8::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn no_help() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:76:9 + | +LL | 2u8.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn no_help() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_be_bytes` + --> $DIR/endian_bytes.rs:77:9 + | +LL | u8::from_be_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn no_help() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:73:9 + | +LL | 2u8.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn little_encourage_host() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:74:9 + | +LL | u8::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little_encourage_host() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:76:9 + | +LL | 2u8.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn little_encourage_host() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_be_bytes` + --> $DIR/endian_bytes.rs:77:9 + | +LL | u8::from_be_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little_encourage_host() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:70:9 + | +LL | 2u8.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn little_encourage_big() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use `to_be_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:71:9 + | +LL | u8::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little_encourage_big() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use `from_be_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:73:9 + | +LL | 2u8.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn little_encourage_big() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use `to_be_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:74:9 + | +LL | u8::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn little_encourage_big() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use `from_be_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_le_bytes` + --> $DIR/endian_bytes.rs:73:9 + | +LL | 2u8.to_le_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn big_encourage_host() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_le_bytes` + --> $DIR/endian_bytes.rs:74:9 + | +LL | u8::from_le_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn big_encourage_host() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:76:9 + | +LL | 2u8.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn big_encourage_host() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `from_be_bytes` + --> $DIR/endian_bytes.rs:77:9 + | +LL | u8::from_be_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn big_encourage_host() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use the native endianness instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_ne_bytes` + --> $DIR/endian_bytes.rs:70:9 + | +LL | 2u8.to_ne_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn big_encourage_little() { fn_body_small!(); } + | ---------------- in this macro invocation | = help: use `to_le_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:71:5 +error: usage of the method `from_ne_bytes` + --> $DIR/endian_bytes.rs:71:9 | -LL | 2u16.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | u8::from_ne_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn big_encourage_little() { fn_body_small!(); } + | ---------------- in this macro invocation + | + = help: use `from_le_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: usage of the method `to_be_bytes` + --> $DIR/endian_bytes.rs:76:9 + | +LL | 2u8.to_be_bytes(); + | ^^^^^^^^^^^^^^^^^ +... +LL | fn big_encourage_little() { fn_body_small!(); } + | ---------------- in this macro invocation | = help: use `to_le_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:72:5 +error: usage of the method `from_be_bytes` + --> $DIR/endian_bytes.rs:77:9 | -LL | 2i16.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^ +LL | u8::from_be_bytes(todo!()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | fn big_encourage_little() { fn_body_small!(); } + | ---------------- in this macro invocation | - = help: use `to_le_bytes` instead + = help: use `from_le_bytes` instead + = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:73:5 - | -LL | 2u32.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^ - | - = help: use `to_le_bytes` instead - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:74:5 - | -LL | 2i32.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^ - | - = help: use `to_le_bytes` instead - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:75:5 - | -LL | 2u64.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^ - | - = help: use `to_le_bytes` instead - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:76:5 - | -LL | 2i64.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^ - | - = help: use `to_le_bytes` instead - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:77:5 - | -LL | 2u128.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^^ - | - = help: use `to_le_bytes` instead - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:78:5 - | -LL | 2i128.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^^ - | - = help: use `to_le_bytes` instead - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:79:5 - | -LL | 2.0f32.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ - | - = help: use `to_le_bytes` instead - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:80:5 - | -LL | 2.0f64.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ - | - = help: use `to_le_bytes` instead - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:81:5 - | -LL | 2usize.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ - | - = help: use `to_le_bytes` instead - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:82:5 - | -LL | 2isize.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ - | - = help: use `to_le_bytes` instead - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:102:5 - | -LL | 2u8.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^ - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:103:5 - | -LL | 2i8.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^ - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:104:5 - | -LL | 2u16.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:105:5 - | -LL | 2i16.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:106:5 - | -LL | 2u32.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:107:5 - | -LL | 2i32.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:108:5 - | -LL | 2u64.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:109:5 - | -LL | 2i64.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:110:5 - | -LL | 2u128.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:111:5 - | -LL | 2i128.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:112:5 - | -LL | 2usize.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:113:5 - | -LL | 2isize.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:114:5 - | -LL | 2.0f32.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_le_bytes` - --> $DIR/endian_bytes.rs:115:5 - | -LL | 2.0f64.to_le_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:135:5 - | -LL | 2u8.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:136:5 - | -LL | 2i8.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:137:5 - | -LL | 2u16.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:138:5 - | -LL | 2i16.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:139:5 - | -LL | 2u32.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:140:5 - | -LL | 2i32.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:141:5 - | -LL | 2u64.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:142:5 - | -LL | 2i64.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:143:5 - | -LL | 2u128.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:144:5 - | -LL | 2i128.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:145:5 - | -LL | 2usize.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:146:5 - | -LL | 2isize.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:147:5 - | -LL | 2.0f32.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ - -error: use of the method `to_be_bytes` - --> $DIR/endian_bytes.rs:148:5 - | -LL | 2.0f64.to_be_bytes(); - | ^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 145 previous errors +error: aborting due to 86 previous errors From 48d36a7aa3d8281352ac70c240d98c18b0a9adfa Mon Sep 17 00:00:00 2001 From: Catherine <114838443+Centri3@users.noreply.github.com> Date: Thu, 25 May 2023 11:15:30 -0500 Subject: [PATCH 3/9] weird grammar --- clippy_lints/src/endian_bytes.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/endian_bytes.rs b/clippy_lints/src/endian_bytes.rs index 6486430cf..88e0d4dcd 100644 --- a/clippy_lints/src/endian_bytes.rs +++ b/clippy_lints/src/endian_bytes.rs @@ -30,7 +30,7 @@ declare_clippy_lint! { /// Checks for the usage of the `to_le_bytes` method. /// /// ### Why is this bad? - /// It's not, but some may wish to lint usages of this method, either to suggest using the host + /// It's not, but some may wish to lint usage of this method, either to suggest using the host /// endianness or big endian. /// /// ### Example @@ -49,7 +49,7 @@ declare_clippy_lint! { /// Checks for the usage of the `to_be_bytes` method. /// /// ### Why is this bad? - /// It's not, but some may wish to lint usages of this method, either to suggest using the host + /// It's not, but some may wish to lint usage of this method, either to suggest using the host /// endianness or little endian. /// /// ### Example From 04b7cae37ec90237682aaff58e7773ad42d22259 Mon Sep 17 00:00:00 2001 From: Centri3 <114838443+Centri3@users.noreply.github.com> Date: Thu, 25 May 2023 11:29:43 -0500 Subject: [PATCH 4/9] refine output --- clippy_lints/src/endian_bytes.rs | 26 ++- tests/ui/endian_bytes.rs | 16 +- tests/ui/endian_bytes.stderr | 384 +++++++++++++++---------------- 3 files changed, 217 insertions(+), 209 deletions(-) diff --git a/clippy_lints/src/endian_bytes.rs b/clippy_lints/src/endian_bytes.rs index 88e0d4dcd..434125932 100644 --- a/clippy_lints/src/endian_bytes.rs +++ b/clippy_lints/src/endian_bytes.rs @@ -2,7 +2,7 @@ use crate::Lint; use clippy_utils::{diagnostics::span_lint_and_then, is_lint_allowed}; use rustc_hir::{Expr, ExprKind}; use rustc_lint::{LateContext, LateLintPass, LintContext}; -use rustc_middle::lint::in_external_macro; +use rustc_middle::{lint::in_external_macro, ty::Ty}; use rustc_session::{declare_lint_pass, declare_tool_lint}; use rustc_span::Symbol; use std::borrow::Cow; @@ -102,11 +102,13 @@ impl LateLintPass<'_> for EndianBytes { if_chain! { if let ExprKind::MethodCall(method_name, receiver, args, ..) = expr.kind; - if let ExprKind::Lit(..) = receiver.kind; if args.is_empty(); - if try_lint_endian_bytes(cx, expr, "to", method_name.ident.name); + let ty = cx.typeck_results().expr_ty(receiver); + if ty.is_primitive_ty(); then { - return; + if try_lint_endian_bytes(cx, expr, "to", method_name.ident.name, ty) { + return; + } } } @@ -115,15 +117,16 @@ impl LateLintPass<'_> for EndianBytes { if let ExprKind::Path(qpath) = function.kind; if let Some(def_id) = cx.qpath_res(&qpath, function.hir_id).opt_def_id(); if let Some(function_name) = cx.get_def_path(def_id).last(); - if cx.typeck_results().expr_ty(expr).is_primitive_ty(); + let ty = cx.typeck_results().expr_ty(expr); + if ty.is_primitive_ty(); then { - try_lint_endian_bytes(cx, expr, "from", *function_name); + try_lint_endian_bytes(cx, expr, "from", *function_name, ty); } } } } -fn try_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &str, name: Symbol) -> bool { +fn try_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &str, name: Symbol, ty: Ty<'_>) -> bool { let ne = format!("{prefix}_ne_bytes"); let le = format!("{prefix}_le_bytes"); let be = format!("{prefix}_be_bytes"); @@ -171,7 +174,7 @@ fn try_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &str, na help_str.push_str("either of "); } - help_str.push_str(&format!("`{}` ", lint.to_name(prefix))); + help_str.push_str(&format!("`{ty}::{}` ", lint.to_name(prefix))); if i != len && !only_one { help_str.push_str("or "); @@ -185,7 +188,12 @@ fn try_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &str, na cx, lint.as_lint(), expr.span, - &format!("usage of the method `{}`", lint.to_name(prefix)), + &format!( + "usage of the {}`{ty}::{}`{}", + if prefix == "from" { "function " } else { "" }, + lint.to_name(prefix), + if prefix == "to" { " method" } else { "" }, + ), move |diag| { if let Some(help) = help { diag.help(help); diff --git a/tests/ui/endian_bytes.rs b/tests/ui/endian_bytes.rs index ccee8e20a..6bf014fc8 100644 --- a/tests/ui/endian_bytes.rs +++ b/tests/ui/endian_bytes.rs @@ -65,7 +65,7 @@ macro_rules! fn_body { } // bless breaks if I use fn_body too much (oops) -macro_rules! fn_body_small { +macro_rules! fn_body_smol { () => { 2u8.to_ne_bytes(); u8::from_ne_bytes(todo!()); @@ -93,35 +93,35 @@ fn big() { fn_body!(); } #[rustfmt::skip] #[warn(clippy::host_endian_bytes)] #[warn(clippy::big_endian_bytes)] -fn host_encourage_little() { fn_body_small!(); } +fn host_encourage_little() { fn_body_smol!(); } #[rustfmt::skip] #[warn(clippy::host_endian_bytes)] #[warn(clippy::little_endian_bytes)] -fn host_encourage_big() { fn_body_small!(); } +fn host_encourage_big() { fn_body_smol!(); } #[rustfmt::skip] #[warn(clippy::host_endian_bytes)] #[warn(clippy::little_endian_bytes)] #[warn(clippy::big_endian_bytes)] -fn no_help() { fn_body_small!(); } +fn no_help() { fn_body_smol!(); } #[rustfmt::skip] #[warn(clippy::little_endian_bytes)] #[warn(clippy::big_endian_bytes)] -fn little_encourage_host() { fn_body_small!(); } +fn little_encourage_host() { fn_body_smol!(); } #[rustfmt::skip] #[warn(clippy::host_endian_bytes)] #[warn(clippy::little_endian_bytes)] -fn little_encourage_big() { fn_body_small!(); } +fn little_encourage_big() { fn_body_smol!(); } #[rustfmt::skip] #[warn(clippy::big_endian_bytes)] #[warn(clippy::little_endian_bytes)] -fn big_encourage_host() { fn_body_small!(); } +fn big_encourage_host() { fn_body_smol!(); } #[rustfmt::skip] #[warn(clippy::host_endian_bytes)] #[warn(clippy::big_endian_bytes)] -fn big_encourage_little() { fn_body_small!(); } +fn big_encourage_little() { fn_body_smol!(); } diff --git a/tests/ui/endian_bytes.stderr b/tests/ui/endian_bytes.stderr index ff8d1a98f..5e64ea5b5 100644 --- a/tests/ui/endian_bytes.stderr +++ b/tests/ui/endian_bytes.stderr @@ -1,4 +1,4 @@ -error: usage of the method `to_ne_bytes` +error: usage of the `u8::to_ne_bytes` method --> $DIR/endian_bytes.rs:7:9 | LL | 2u8.to_ne_bytes(); @@ -11,7 +11,7 @@ LL | fn host() { fn_body!(); } = note: `-D clippy::host-endian-bytes` implied by `-D warnings` = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `i8::to_ne_bytes` method --> $DIR/endian_bytes.rs:8:9 | LL | 2i8.to_ne_bytes(); @@ -23,7 +23,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `u16::to_ne_bytes` method --> $DIR/endian_bytes.rs:9:9 | LL | 2u16.to_ne_bytes(); @@ -35,7 +35,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `i16::to_ne_bytes` method --> $DIR/endian_bytes.rs:10:9 | LL | 2i16.to_ne_bytes(); @@ -47,7 +47,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `u32::to_ne_bytes` method --> $DIR/endian_bytes.rs:11:9 | LL | 2u32.to_ne_bytes(); @@ -59,7 +59,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `i32::to_ne_bytes` method --> $DIR/endian_bytes.rs:12:9 | LL | 2i32.to_ne_bytes(); @@ -71,7 +71,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `u64::to_ne_bytes` method --> $DIR/endian_bytes.rs:13:9 | LL | 2u64.to_ne_bytes(); @@ -83,7 +83,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `i64::to_ne_bytes` method --> $DIR/endian_bytes.rs:14:9 | LL | 2i64.to_ne_bytes(); @@ -95,7 +95,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `u128::to_ne_bytes` method --> $DIR/endian_bytes.rs:15:9 | LL | 2u128.to_ne_bytes(); @@ -107,7 +107,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `i128::to_ne_bytes` method --> $DIR/endian_bytes.rs:16:9 | LL | 2i128.to_ne_bytes(); @@ -119,7 +119,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `f32::to_ne_bytes` method --> $DIR/endian_bytes.rs:17:9 | LL | 2.0f32.to_ne_bytes(); @@ -131,7 +131,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `f64::to_ne_bytes` method --> $DIR/endian_bytes.rs:18:9 | LL | 2.0f64.to_ne_bytes(); @@ -143,7 +143,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `usize::to_ne_bytes` method --> $DIR/endian_bytes.rs:19:9 | LL | 2usize.to_ne_bytes(); @@ -155,7 +155,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `isize::to_ne_bytes` method --> $DIR/endian_bytes.rs:20:9 | LL | 2isize.to_ne_bytes(); @@ -167,7 +167,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `u8::from_ne_bytes` --> $DIR/endian_bytes.rs:21:9 | LL | u8::from_ne_bytes(todo!()); @@ -179,7 +179,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `i8::from_ne_bytes` --> $DIR/endian_bytes.rs:22:9 | LL | i8::from_ne_bytes(todo!()); @@ -191,7 +191,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `u16::from_ne_bytes` --> $DIR/endian_bytes.rs:23:9 | LL | u16::from_ne_bytes(todo!()); @@ -203,7 +203,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `i16::from_ne_bytes` --> $DIR/endian_bytes.rs:24:9 | LL | i16::from_ne_bytes(todo!()); @@ -215,7 +215,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `u32::from_ne_bytes` --> $DIR/endian_bytes.rs:25:9 | LL | u32::from_ne_bytes(todo!()); @@ -227,7 +227,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `i32::from_ne_bytes` --> $DIR/endian_bytes.rs:26:9 | LL | i32::from_ne_bytes(todo!()); @@ -239,7 +239,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `u64::from_ne_bytes` --> $DIR/endian_bytes.rs:27:9 | LL | u64::from_ne_bytes(todo!()); @@ -251,7 +251,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `i64::from_ne_bytes` --> $DIR/endian_bytes.rs:28:9 | LL | i64::from_ne_bytes(todo!()); @@ -263,7 +263,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `u128::from_ne_bytes` --> $DIR/endian_bytes.rs:29:9 | LL | u128::from_ne_bytes(todo!()); @@ -275,7 +275,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `i128::from_ne_bytes` --> $DIR/endian_bytes.rs:30:9 | LL | i128::from_ne_bytes(todo!()); @@ -287,7 +287,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `usize::from_ne_bytes` --> $DIR/endian_bytes.rs:31:9 | LL | usize::from_ne_bytes(todo!()); @@ -299,7 +299,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `isize::from_ne_bytes` --> $DIR/endian_bytes.rs:32:9 | LL | isize::from_ne_bytes(todo!()); @@ -311,7 +311,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `f32::from_ne_bytes` --> $DIR/endian_bytes.rs:33:9 | LL | f32::from_ne_bytes(todo!()); @@ -323,7 +323,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `f64::from_ne_bytes` --> $DIR/endian_bytes.rs:34:9 | LL | f64::from_ne_bytes(todo!()); @@ -335,7 +335,7 @@ LL | fn host() { fn_body!(); } = help: specify the desired endianness explicitly = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `u8::to_le_bytes` method --> $DIR/endian_bytes.rs:36:9 | LL | 2u8.to_le_bytes(); @@ -348,7 +348,7 @@ LL | fn little() { fn_body!(); } = note: `-D clippy::little-endian-bytes` implied by `-D warnings` = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `i8::to_le_bytes` method --> $DIR/endian_bytes.rs:37:9 | LL | 2i8.to_le_bytes(); @@ -360,7 +360,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `u16::to_le_bytes` method --> $DIR/endian_bytes.rs:38:9 | LL | 2u16.to_le_bytes(); @@ -372,7 +372,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `i16::to_le_bytes` method --> $DIR/endian_bytes.rs:39:9 | LL | 2i16.to_le_bytes(); @@ -384,7 +384,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `u32::to_le_bytes` method --> $DIR/endian_bytes.rs:40:9 | LL | 2u32.to_le_bytes(); @@ -396,7 +396,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `i32::to_le_bytes` method --> $DIR/endian_bytes.rs:41:9 | LL | 2i32.to_le_bytes(); @@ -408,7 +408,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `u64::to_le_bytes` method --> $DIR/endian_bytes.rs:42:9 | LL | 2u64.to_le_bytes(); @@ -420,7 +420,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `i64::to_le_bytes` method --> $DIR/endian_bytes.rs:43:9 | LL | 2i64.to_le_bytes(); @@ -432,7 +432,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `u128::to_le_bytes` method --> $DIR/endian_bytes.rs:44:9 | LL | 2u128.to_le_bytes(); @@ -444,7 +444,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `i128::to_le_bytes` method --> $DIR/endian_bytes.rs:45:9 | LL | 2i128.to_le_bytes(); @@ -456,7 +456,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `f32::to_le_bytes` method --> $DIR/endian_bytes.rs:46:9 | LL | 2.0f32.to_le_bytes(); @@ -468,7 +468,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `f64::to_le_bytes` method --> $DIR/endian_bytes.rs:47:9 | LL | 2.0f64.to_le_bytes(); @@ -480,7 +480,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `usize::to_le_bytes` method --> $DIR/endian_bytes.rs:48:9 | LL | 2usize.to_le_bytes(); @@ -492,7 +492,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `isize::to_le_bytes` method --> $DIR/endian_bytes.rs:49:9 | LL | 2isize.to_le_bytes(); @@ -504,7 +504,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `u8::from_le_bytes` --> $DIR/endian_bytes.rs:50:9 | LL | u8::from_le_bytes(todo!()); @@ -516,7 +516,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `i8::from_le_bytes` --> $DIR/endian_bytes.rs:51:9 | LL | i8::from_le_bytes(todo!()); @@ -528,7 +528,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `u16::from_le_bytes` --> $DIR/endian_bytes.rs:52:9 | LL | u16::from_le_bytes(todo!()); @@ -540,7 +540,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `i16::from_le_bytes` --> $DIR/endian_bytes.rs:53:9 | LL | i16::from_le_bytes(todo!()); @@ -552,7 +552,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `u32::from_le_bytes` --> $DIR/endian_bytes.rs:54:9 | LL | u32::from_le_bytes(todo!()); @@ -564,7 +564,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `i32::from_le_bytes` --> $DIR/endian_bytes.rs:55:9 | LL | i32::from_le_bytes(todo!()); @@ -576,7 +576,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `u64::from_le_bytes` --> $DIR/endian_bytes.rs:56:9 | LL | u64::from_le_bytes(todo!()); @@ -588,7 +588,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `i64::from_le_bytes` --> $DIR/endian_bytes.rs:57:9 | LL | i64::from_le_bytes(todo!()); @@ -600,7 +600,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `u128::from_le_bytes` --> $DIR/endian_bytes.rs:58:9 | LL | u128::from_le_bytes(todo!()); @@ -612,7 +612,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `i128::from_le_bytes` --> $DIR/endian_bytes.rs:59:9 | LL | i128::from_le_bytes(todo!()); @@ -624,7 +624,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `usize::from_le_bytes` --> $DIR/endian_bytes.rs:60:9 | LL | usize::from_le_bytes(todo!()); @@ -636,7 +636,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `isize::from_le_bytes` --> $DIR/endian_bytes.rs:61:9 | LL | isize::from_le_bytes(todo!()); @@ -648,7 +648,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `f32::from_le_bytes` --> $DIR/endian_bytes.rs:62:9 | LL | f32::from_le_bytes(todo!()); @@ -660,7 +660,7 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `f64::from_le_bytes` --> $DIR/endian_bytes.rs:63:9 | LL | f64::from_le_bytes(todo!()); @@ -672,360 +672,360 @@ LL | fn little() { fn_body!(); } = help: use the native endianness instead = note: this error originates in the macro `fn_body` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `u8::to_ne_bytes` method --> $DIR/endian_bytes.rs:70:9 | LL | 2u8.to_ne_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn host_encourage_little() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn host_encourage_little() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `to_le_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::to_le_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `u8::from_ne_bytes` --> $DIR/endian_bytes.rs:71:9 | LL | u8::from_ne_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn host_encourage_little() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn host_encourage_little() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `from_le_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::from_le_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_be_bytes` +error: usage of the `u8::to_be_bytes` method --> $DIR/endian_bytes.rs:76:9 | LL | 2u8.to_be_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn host_encourage_little() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn host_encourage_little() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `to_le_bytes` instead + = help: use `u8::to_le_bytes` instead = note: `-D clippy::big-endian-bytes` implied by `-D warnings` - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_be_bytes` +error: usage of the function `u8::from_be_bytes` --> $DIR/endian_bytes.rs:77:9 | LL | u8::from_be_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn host_encourage_little() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn host_encourage_little() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `from_le_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::from_le_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `u8::to_ne_bytes` method --> $DIR/endian_bytes.rs:70:9 | LL | 2u8.to_ne_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn host_encourage_big() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn host_encourage_big() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `to_be_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::to_be_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `u8::from_ne_bytes` --> $DIR/endian_bytes.rs:71:9 | LL | u8::from_ne_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn host_encourage_big() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn host_encourage_big() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `from_be_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::from_be_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `u8::to_le_bytes` method --> $DIR/endian_bytes.rs:73:9 | LL | 2u8.to_le_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn host_encourage_big() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn host_encourage_big() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `to_be_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::to_be_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `u8::from_le_bytes` --> $DIR/endian_bytes.rs:74:9 | LL | u8::from_le_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn host_encourage_big() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn host_encourage_big() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `from_be_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::from_be_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `u8::to_ne_bytes` method --> $DIR/endian_bytes.rs:70:9 | LL | 2u8.to_ne_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn no_help() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn no_help() { fn_body_smol!(); } + | --------------- in this macro invocation | - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `u8::from_ne_bytes` --> $DIR/endian_bytes.rs:71:9 | LL | u8::from_ne_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn no_help() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn no_help() { fn_body_smol!(); } + | --------------- in this macro invocation | - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `u8::to_le_bytes` method --> $DIR/endian_bytes.rs:73:9 | LL | 2u8.to_le_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn no_help() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn no_help() { fn_body_smol!(); } + | --------------- in this macro invocation | - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `u8::from_le_bytes` --> $DIR/endian_bytes.rs:74:9 | LL | u8::from_le_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn no_help() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn no_help() { fn_body_smol!(); } + | --------------- in this macro invocation | - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_be_bytes` +error: usage of the `u8::to_be_bytes` method --> $DIR/endian_bytes.rs:76:9 | LL | 2u8.to_be_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn no_help() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn no_help() { fn_body_smol!(); } + | --------------- in this macro invocation | - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_be_bytes` +error: usage of the function `u8::from_be_bytes` --> $DIR/endian_bytes.rs:77:9 | LL | u8::from_be_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn no_help() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn no_help() { fn_body_smol!(); } + | --------------- in this macro invocation | - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `u8::to_le_bytes` method --> $DIR/endian_bytes.rs:73:9 | LL | 2u8.to_le_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn little_encourage_host() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn little_encourage_host() { fn_body_smol!(); } + | --------------- in this macro invocation | = help: use the native endianness instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `u8::from_le_bytes` --> $DIR/endian_bytes.rs:74:9 | LL | u8::from_le_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn little_encourage_host() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn little_encourage_host() { fn_body_smol!(); } + | --------------- in this macro invocation | = help: use the native endianness instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_be_bytes` +error: usage of the `u8::to_be_bytes` method --> $DIR/endian_bytes.rs:76:9 | LL | 2u8.to_be_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn little_encourage_host() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn little_encourage_host() { fn_body_smol!(); } + | --------------- in this macro invocation | = help: use the native endianness instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_be_bytes` +error: usage of the function `u8::from_be_bytes` --> $DIR/endian_bytes.rs:77:9 | LL | u8::from_be_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn little_encourage_host() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn little_encourage_host() { fn_body_smol!(); } + | --------------- in this macro invocation | = help: use the native endianness instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `u8::to_ne_bytes` method --> $DIR/endian_bytes.rs:70:9 | LL | 2u8.to_ne_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn little_encourage_big() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn little_encourage_big() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `to_be_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::to_be_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `u8::from_ne_bytes` --> $DIR/endian_bytes.rs:71:9 | LL | u8::from_ne_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn little_encourage_big() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn little_encourage_big() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `from_be_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::from_be_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `u8::to_le_bytes` method --> $DIR/endian_bytes.rs:73:9 | LL | 2u8.to_le_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn little_encourage_big() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn little_encourage_big() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `to_be_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::to_be_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `u8::from_le_bytes` --> $DIR/endian_bytes.rs:74:9 | LL | u8::from_le_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn little_encourage_big() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn little_encourage_big() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `from_be_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::from_be_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_le_bytes` +error: usage of the `u8::to_le_bytes` method --> $DIR/endian_bytes.rs:73:9 | LL | 2u8.to_le_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn big_encourage_host() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn big_encourage_host() { fn_body_smol!(); } + | --------------- in this macro invocation | = help: use the native endianness instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_le_bytes` +error: usage of the function `u8::from_le_bytes` --> $DIR/endian_bytes.rs:74:9 | LL | u8::from_le_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn big_encourage_host() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn big_encourage_host() { fn_body_smol!(); } + | --------------- in this macro invocation | = help: use the native endianness instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_be_bytes` +error: usage of the `u8::to_be_bytes` method --> $DIR/endian_bytes.rs:76:9 | LL | 2u8.to_be_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn big_encourage_host() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn big_encourage_host() { fn_body_smol!(); } + | --------------- in this macro invocation | = help: use the native endianness instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_be_bytes` +error: usage of the function `u8::from_be_bytes` --> $DIR/endian_bytes.rs:77:9 | LL | u8::from_be_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn big_encourage_host() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn big_encourage_host() { fn_body_smol!(); } + | --------------- in this macro invocation | = help: use the native endianness instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_ne_bytes` +error: usage of the `u8::to_ne_bytes` method --> $DIR/endian_bytes.rs:70:9 | LL | 2u8.to_ne_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn big_encourage_little() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn big_encourage_little() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `to_le_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::to_le_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_ne_bytes` +error: usage of the function `u8::from_ne_bytes` --> $DIR/endian_bytes.rs:71:9 | LL | u8::from_ne_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn big_encourage_little() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn big_encourage_little() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `from_le_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::from_le_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `to_be_bytes` +error: usage of the `u8::to_be_bytes` method --> $DIR/endian_bytes.rs:76:9 | LL | 2u8.to_be_bytes(); | ^^^^^^^^^^^^^^^^^ ... -LL | fn big_encourage_little() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn big_encourage_little() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `to_le_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::to_le_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) -error: usage of the method `from_be_bytes` +error: usage of the function `u8::from_be_bytes` --> $DIR/endian_bytes.rs:77:9 | LL | u8::from_be_bytes(todo!()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ... -LL | fn big_encourage_little() { fn_body_small!(); } - | ---------------- in this macro invocation +LL | fn big_encourage_little() { fn_body_smol!(); } + | --------------- in this macro invocation | - = help: use `from_le_bytes` instead - = note: this error originates in the macro `fn_body_small` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: use `u8::from_le_bytes` instead + = note: this error originates in the macro `fn_body_smol` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 86 previous errors From 80ae1ec12d6aa7d5cec840387c14a196296b983c Mon Sep 17 00:00:00 2001 From: Centri3 <114838443+Centri3@users.noreply.github.com> Date: Thu, 25 May 2023 11:43:14 -0500 Subject: [PATCH 5/9] unidiomatic `if_chain!` --- clippy_lints/src/endian_bytes.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clippy_lints/src/endian_bytes.rs b/clippy_lints/src/endian_bytes.rs index 434125932..05005a791 100644 --- a/clippy_lints/src/endian_bytes.rs +++ b/clippy_lints/src/endian_bytes.rs @@ -105,10 +105,9 @@ impl LateLintPass<'_> for EndianBytes { if args.is_empty(); let ty = cx.typeck_results().expr_ty(receiver); if ty.is_primitive_ty(); + if try_lint_endian_bytes(cx, expr, "to", method_name.ident.name, ty); then { - if try_lint_endian_bytes(cx, expr, "to", method_name.ident.name, ty) { - return; - } + return; } } From 95e8c0b35a0963aa998aa68d9c74cdb2c5a5e6ab Mon Sep 17 00:00:00 2001 From: Centri3 <114838443+Centri3@users.noreply.github.com> Date: Wed, 31 May 2023 17:29:18 -0500 Subject: [PATCH 6/9] don't allocate the names --- clippy_lints/src/endian_bytes.rs | 48 +++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/clippy_lints/src/endian_bytes.rs b/clippy_lints/src/endian_bytes.rs index 05005a791..19fb74b90 100644 --- a/clippy_lints/src/endian_bytes.rs +++ b/clippy_lints/src/endian_bytes.rs @@ -9,7 +9,7 @@ use std::borrow::Cow; declare_clippy_lint! { /// ### What it does - /// Checks for the usage of the `to_ne_bytes` method. + /// Checks for the usage of the `to_ne_bytes` method and/or the function `from_ne_bytes`. /// /// ### Why is this bad? /// It's not, but some may prefer to specify the target endianness explicitly. @@ -27,7 +27,7 @@ declare_clippy_lint! { declare_clippy_lint! { /// ### What it does - /// Checks for the usage of the `to_le_bytes` method. + /// Checks for the usage of the `to_le_bytes` method and/or the function `from_le_bytes`. /// /// ### Why is this bad? /// It's not, but some may wish to lint usage of this method, either to suggest using the host @@ -46,7 +46,7 @@ declare_clippy_lint! { declare_clippy_lint! { /// ### What it does - /// Checks for the usage of the `to_be_bytes` method. + /// Checks for the usage of the `to_be_bytes` method and/or the function `from_be_bytes`. /// /// ### Why is this bad? /// It's not, but some may wish to lint usage of this method, either to suggest using the host @@ -65,6 +65,10 @@ declare_clippy_lint! { declare_lint_pass!(EndianBytes => [HOST_ENDIAN_BYTES, LITTLE_ENDIAN_BYTES, BIG_ENDIAN_BYTES]); +const HOST_NAMES: [&str; 2] = ["from_ne_bytes", "to_ne_bytes"]; +const LITTLE_NAMES: [&str; 2] = ["from_le_bytes", "to_le_bytes"]; +const BIG_NAMES: [&str; 2] = ["from_be_bytes", "to_be_bytes"]; + #[derive(Clone, Debug)] enum LintKind { Host, @@ -85,11 +89,29 @@ impl LintKind { } } - fn to_name(&self, prefix: &str) -> String { + fn to_name(&self, prefix: &str) -> &str { match self { - LintKind::Host => format!("{prefix}_ne_bytes"), - LintKind::Little => format!("{prefix}_le_bytes"), - LintKind::Big => format!("{prefix}_be_bytes"), + LintKind::Host => { + if prefix == "from" { + HOST_NAMES[0] + } else { + HOST_NAMES[1] + } + }, + LintKind::Little => { + if prefix == "from" { + LITTLE_NAMES[0] + } else { + LITTLE_NAMES[1] + } + }, + LintKind::Big => { + if prefix == "from" { + BIG_NAMES[0] + } else { + BIG_NAMES[1] + } + }, } } } @@ -105,7 +127,7 @@ impl LateLintPass<'_> for EndianBytes { if args.is_empty(); let ty = cx.typeck_results().expr_ty(receiver); if ty.is_primitive_ty(); - if try_lint_endian_bytes(cx, expr, "to", method_name.ident.name, ty); + if maybe_lint_endian_bytes(cx, expr, "to", method_name.ident.name, ty); then { return; } @@ -119,16 +141,16 @@ impl LateLintPass<'_> for EndianBytes { let ty = cx.typeck_results().expr_ty(expr); if ty.is_primitive_ty(); then { - try_lint_endian_bytes(cx, expr, "from", *function_name, ty); + maybe_lint_endian_bytes(cx, expr, "from", *function_name, ty); } } } } -fn try_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &str, name: Symbol, ty: Ty<'_>) -> bool { - let ne = format!("{prefix}_ne_bytes"); - let le = format!("{prefix}_le_bytes"); - let be = format!("{prefix}_be_bytes"); +fn maybe_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &str, name: Symbol, ty: Ty<'_>) -> bool { + let ne = LintKind::Host.to_name(prefix); + let le = LintKind::Little.to_name(prefix); + let be = LintKind::Big.to_name(prefix); let (lint, other_lints) = match name.as_str() { name if name == ne => ((&LintKind::Host), [(&LintKind::Little), (&LintKind::Big)]), From a6c36556c89ddd6902be7941cadd28812f63d6ed Mon Sep 17 00:00:00 2001 From: Centri3 <114838443+Centri3@users.noreply.github.com> Date: Fri, 2 Jun 2023 14:35:54 -0500 Subject: [PATCH 7/9] use enum for `prefix` instead of `&str` --- clippy_lints/src/endian_bytes.rs | 61 ++++++++++++++------------------ 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/clippy_lints/src/endian_bytes.rs b/clippy_lints/src/endian_bytes.rs index 19fb74b90..8328531de 100644 --- a/clippy_lints/src/endian_bytes.rs +++ b/clippy_lints/src/endian_bytes.rs @@ -76,6 +76,11 @@ enum LintKind { Big, } +enum Prefix { + From, + To, +} + impl LintKind { fn allowed(&self, cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { is_lint_allowed(cx, self.as_lint(), expr.hir_id) @@ -89,29 +94,13 @@ impl LintKind { } } - fn to_name(&self, prefix: &str) -> &str { + fn as_name(&self, prefix: &Prefix) -> &str { + let index = if matches!(prefix, Prefix::From) { 0 } else { 1 }; + match self { - LintKind::Host => { - if prefix == "from" { - HOST_NAMES[0] - } else { - HOST_NAMES[1] - } - }, - LintKind::Little => { - if prefix == "from" { - LITTLE_NAMES[0] - } else { - LITTLE_NAMES[1] - } - }, - LintKind::Big => { - if prefix == "from" { - BIG_NAMES[0] - } else { - BIG_NAMES[1] - } - }, + LintKind::Host => HOST_NAMES[index], + LintKind::Little => LITTLE_NAMES[index], + LintKind::Big => BIG_NAMES[index], } } } @@ -127,7 +116,7 @@ impl LateLintPass<'_> for EndianBytes { if args.is_empty(); let ty = cx.typeck_results().expr_ty(receiver); if ty.is_primitive_ty(); - if maybe_lint_endian_bytes(cx, expr, "to", method_name.ident.name, ty); + if maybe_lint_endian_bytes(cx, expr, &Prefix::To, method_name.ident.name, ty); then { return; } @@ -141,16 +130,16 @@ impl LateLintPass<'_> for EndianBytes { let ty = cx.typeck_results().expr_ty(expr); if ty.is_primitive_ty(); then { - maybe_lint_endian_bytes(cx, expr, "from", *function_name, ty); + maybe_lint_endian_bytes(cx, expr, &Prefix::From, *function_name, ty); } } } } -fn maybe_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &str, name: Symbol, ty: Ty<'_>) -> bool { - let ne = LintKind::Host.to_name(prefix); - let le = LintKind::Little.to_name(prefix); - let be = LintKind::Big.to_name(prefix); +fn maybe_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &Prefix, name: Symbol, ty: Ty<'_>) -> bool { + let ne = LintKind::Host.as_name(prefix); + let le = LintKind::Little.as_name(prefix); + let be = LintKind::Big.as_name(prefix); let (lint, other_lints) = match name.as_str() { name if name == ne => ((&LintKind::Host), [(&LintKind::Little), (&LintKind::Big)]), @@ -172,14 +161,14 @@ fn maybe_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &str, } // ne_bytes and all other lints allowed - if lint.to_name(prefix) == ne && other_lints.iter().all(|lint| lint.allowed(cx, expr)) { + if lint.as_name(prefix) == ne && other_lints.iter().all(|lint| lint.allowed(cx, expr)) { help = Some(Cow::Borrowed("specify the desired endianness explicitly")); break 'build_help; } // le_bytes where ne_bytes allowed but be_bytes is not, or le_bytes where ne_bytes allowed but // le_bytes is not - if (lint.to_name(prefix) == le || lint.to_name(prefix) == be) && LintKind::Host.allowed(cx, expr) { + if (lint.as_name(prefix) == le || lint.as_name(prefix) == be) && LintKind::Host.allowed(cx, expr) { help = Some(Cow::Borrowed("use the native endianness instead")); break 'build_help; } @@ -195,7 +184,7 @@ fn maybe_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &str, help_str.push_str("either of "); } - help_str.push_str(&format!("`{ty}::{}` ", lint.to_name(prefix))); + help_str.push_str(&format!("`{ty}::{}` ", lint.as_name(prefix))); if i != len && !only_one { help_str.push_str("or "); @@ -211,9 +200,13 @@ fn maybe_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &str, expr.span, &format!( "usage of the {}`{ty}::{}`{}", - if prefix == "from" { "function " } else { "" }, - lint.to_name(prefix), - if prefix == "to" { " method" } else { "" }, + if matches!(prefix, Prefix::From) { + "function " + } else { + "" + }, + lint.as_name(prefix), + if matches!(prefix, Prefix::To) { " method" } else { "" }, ), move |diag| { if let Some(help) = help { From b1a21ae347eac7f6ce5d3bfa368b8ae5fbf1a621 Mon Sep 17 00:00:00 2001 From: Centri3 <114838443+Centri3@users.noreply.github.com> Date: Fri, 2 Jun 2023 14:38:03 -0500 Subject: [PATCH 8/9] Update endian_bytes.rs --- clippy_lints/src/endian_bytes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/endian_bytes.rs b/clippy_lints/src/endian_bytes.rs index 8328531de..bc7dd8534 100644 --- a/clippy_lints/src/endian_bytes.rs +++ b/clippy_lints/src/endian_bytes.rs @@ -95,7 +95,7 @@ impl LintKind { } fn as_name(&self, prefix: &Prefix) -> &str { - let index = if matches!(prefix, Prefix::From) { 0 } else { 1 }; + let index = usize::from(matches!(prefix, Prefix::To)); match self { LintKind::Host => HOST_NAMES[index], From 7fe200ed0586b690cc6a0981fa4e7b74c248e273 Mon Sep 17 00:00:00 2001 From: Centri3 <114838443+Centri3@users.noreply.github.com> Date: Sat, 3 Jun 2023 14:31:40 -0500 Subject: [PATCH 9/9] derive Copy/PartialEq for `Prefix` --- clippy_lints/src/endian_bytes.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/clippy_lints/src/endian_bytes.rs b/clippy_lints/src/endian_bytes.rs index bc7dd8534..f47098783 100644 --- a/clippy_lints/src/endian_bytes.rs +++ b/clippy_lints/src/endian_bytes.rs @@ -76,6 +76,7 @@ enum LintKind { Big, } +#[derive(Clone, Copy, PartialEq)] enum Prefix { From, To, @@ -94,8 +95,8 @@ impl LintKind { } } - fn as_name(&self, prefix: &Prefix) -> &str { - let index = usize::from(matches!(prefix, Prefix::To)); + fn as_name(&self, prefix: Prefix) -> &str { + let index = usize::from(prefix == Prefix::To); match self { LintKind::Host => HOST_NAMES[index], @@ -116,7 +117,7 @@ impl LateLintPass<'_> for EndianBytes { if args.is_empty(); let ty = cx.typeck_results().expr_ty(receiver); if ty.is_primitive_ty(); - if maybe_lint_endian_bytes(cx, expr, &Prefix::To, method_name.ident.name, ty); + if maybe_lint_endian_bytes(cx, expr, Prefix::To, method_name.ident.name, ty); then { return; } @@ -130,13 +131,13 @@ impl LateLintPass<'_> for EndianBytes { let ty = cx.typeck_results().expr_ty(expr); if ty.is_primitive_ty(); then { - maybe_lint_endian_bytes(cx, expr, &Prefix::From, *function_name, ty); + maybe_lint_endian_bytes(cx, expr, Prefix::From, *function_name, ty); } } } } -fn maybe_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &Prefix, name: Symbol, ty: Ty<'_>) -> bool { +fn maybe_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: Prefix, name: Symbol, ty: Ty<'_>) -> bool { let ne = LintKind::Host.as_name(prefix); let le = LintKind::Little.as_name(prefix); let be = LintKind::Big.as_name(prefix); @@ -200,13 +201,9 @@ fn maybe_lint_endian_bytes(cx: &LateContext<'_>, expr: &Expr<'_>, prefix: &Prefi expr.span, &format!( "usage of the {}`{ty}::{}`{}", - if matches!(prefix, Prefix::From) { - "function " - } else { - "" - }, + if prefix == Prefix::From { "function " } else { "" }, lint.as_name(prefix), - if matches!(prefix, Prefix::To) { " method" } else { "" }, + if prefix == Prefix::To { " method" } else { "" }, ), move |diag| { if let Some(help) = help {