Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

1use crate::spec::{Abi, Arch, Cc, LinkerFlavor, Lld, Target, TargetMetadata, TargetOptions, base};
2
3// This target is for glibc Linux on Csky
4
5pub(crate) fn target() -> Target {
6 Target {
7 //https://github.com/llvm/llvm-project/blob/8b76aea8d8b1b71f6220bc2845abc749f18a19b7/clang/lib/Basic/Targets/CSKY.h
…lines 8–12 unchanged (5 lines)
13 std: Some(true)
14 },
15 pointer_width: 32,
16 data_layout: "e-m:e-S32-p:32:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:32-v128:32:32-a:0:32-Fi32-n32".into(),
17 arch: Arch::CSky,
18 options: TargetOptions {
19 abi: Abi::AbiV2,
20 features: "+2e3,+3e7,+7e10,+cache,+dsp1e2,+dspe60,+e1,+e2,+edsp,+elrw,+hard-tp,+high-registers,+hwdiv,+mp,+mp1e2,+nvic,+trust".into(),
21 late_link_args: TargetOptions::link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-l:libatomic.a"]),
22 max_atomic_width: Some(32),
23 ..base::linux_gnu::opts()
24 },
25 }
26}
27

After

1use crate::spec::{
2 Arch, Cc, CfgAbi, LinkerFlavor, Lld, Target, TargetMetadata, TargetOptions, base,
3};
4
5// This target is for glibc Linux on Csky
6
7pub(crate) fn target() -> Target {
8 Target {
9 //https://github.com/llvm/llvm-project/blob/8b76aea8d8b1b71f6220bc2845abc749f18a19b7/clang/lib/Basic/Targets/CSKY.h
…lines 10–14 unchanged (5 lines)
15 std: Some(true)
16 },
17 pointer_width: 32,
18 data_layout: "e-m:e-S32-p:32:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:32-v128:32:32-a:0:32-Fi32-n32".into(),
19 arch: Arch::CSky,
20 options: TargetOptions {
21 cfg_abi: CfgAbi::AbiV2,
22 features: "+2e3,+3e7,+7e10,+cache,+dsp1e2,+dspe60,+e1,+e2,+edsp,+elrw,+hard-tp,+high-registers,+hwdiv,+mp,+mp1e2,+nvic,+trust".into(),
23 late_link_args: TargetOptions::link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-l:libatomic.a"]),
24 max_atomic_width: Some(32),
25 ..base::linux_gnu::opts()
26 },
27 }
28}
29

Before

source_file
use_declaration
use "use"
scoped_use_list
scoped_identifier
crate "crate"
:: "::"
identifier "spec"
:: "::"
use_list
{ "{"
identifier "Abi"
, ","
identifier "Arch"
, ","
identifier "Cc"
, ","
identifier "LinkerFlavor"
, ","
identifier "Lld"
, ","
identifier "Target"
, ","
identifier "TargetMetadata"
, ","
identifier "TargetOptions"
, ","
identifier "base"
} "}"
; ";"
line_comment
// "//"
function_item
visibility_modifier
pub "pub"
( "("
crate "crate"
) ")"
fn "fn"
identifier "target"
parameters
( "("
) ")"
-> "->"
type_identifier "Target"
block
{ "{"
struct_expression
type_identifier "Target"
field_initializer_list
{ "{"
line_comment
// "//"
field_initializer
field_identifier "llvm_target"
: ":"
call_expression
field_expression
string_literal
" "\""
string_content "csky-unknown-linux-gnuabiv2"
" "\""
. "."
field_identifier "into"
arguments
( "("
) ")"
, ","
field_initializer (+59 nodes collapsed)
, ","
field_initializer
field_identifier "pointer_width"
: ":"
integer_literal "32"
, ","
field_initializer
field_identifier "data_layout"
: ":"
call_expression
field_expression
string_literal
" "\""
string_content "e-m:e-S32-p:32:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v6"...
" "\""
. "."
field_identifier "into"
arguments
( "("
) ")"
, ","
field_initializer
field_identifier "arch"
: ":"
scoped_identifier
identifier "Arch"
:: "::"
identifier "CSky"
, ","
field_initializer
field_identifier "options"
: ":"
struct_expression
type_identifier "TargetOptions"
field_initializer_list
{ "{"
field_initializer
field_identifier "abi"
: ":"
scoped_identifier
identifier "Abi"
:: "::"
identifier "AbiV2"
, ","
field_initializer
field_identifier "features"
: ":"
call_expression
field_expression
string_literal
" "\""
string_content "+2e3,+3e7,+7e10,+cache,+dsp1e2,+dspe60,+e1,+e2,+edsp,+elrw,+"...
" "\""
. "."
field_identifier "into"
arguments
( "("
) ")"
, ","
field_initializer (+38 nodes collapsed)
, ","
field_initializer
field_identifier "max_atomic_width"
: ":"
call_expression
identifier "Some"
arguments
( "("
integer_literal "32"
) ")"
, ","
base_field_initializer
.. ".."
call_expression
scoped_identifier
scoped_identifier
identifier "base"
:: "::"
identifier "linux_gnu"
:: "::"
identifier "opts"
arguments
( "("
) ")"
} "}"
, ","
} "}"
} "}"

After

source_file
use_declaration
use "use"
scoped_use_list
scoped_identifier
crate "crate"
:: "::"
identifier "spec"
:: "::"
use_list
{ "{"
identifier "Arch"
, ","
identifier "Cc"
, ","
identifier "CfgAbi"
, ","
identifier "LinkerFlavor"
, ","
identifier "Lld"
, ","
identifier "Target"
, ","
identifier "TargetMetadata"
, ","
identifier "TargetOptions"
, ","
identifier "base"
, ","
} "}"
; ";"
line_comment
// "//"
function_item
visibility_modifier
pub "pub"
( "("
crate "crate"
) ")"
fn "fn"
identifier "target"
parameters
( "("
) ")"
-> "->"
type_identifier "Target"
block
{ "{"
struct_expression
type_identifier "Target"
field_initializer_list
{ "{"
line_comment
// "//"
field_initializer
field_identifier "llvm_target"
: ":"
call_expression
field_expression
string_literal
" "\""
string_content "csky-unknown-linux-gnuabiv2"
" "\""
. "."
field_identifier "into"
arguments
( "("
) ")"
, ","
field_initializer (+59 nodes collapsed)
, ","
field_initializer
field_identifier "pointer_width"
: ":"
integer_literal "32"
, ","
field_initializer
field_identifier "data_layout"
: ":"
call_expression
field_expression
string_literal
" "\""
string_content "e-m:e-S32-p:32:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v6"...
" "\""
. "."
field_identifier "into"
arguments
( "("
) ")"
, ","
field_initializer
field_identifier "arch"
: ":"
scoped_identifier
identifier "Arch"
:: "::"
identifier "CSky"
, ","
field_initializer
field_identifier "options"
: ":"
struct_expression
type_identifier "TargetOptions"
field_initializer_list
{ "{"
field_initializer
field_identifier "cfg_abi"
: ":"
scoped_identifier
identifier "CfgAbi"
:: "::"
identifier "AbiV2"
, ","
field_initializer
field_identifier "features"
: ":"
call_expression
field_expression
string_literal
" "\""
string_content "+2e3,+3e7,+7e10,+cache,+dsp1e2,+dspe60,+e1,+e2,+edsp,+elrw,+"...
" "\""
. "."
field_identifier "into"
arguments
( "("
) ")"
, ","
field_initializer (+38 nodes collapsed)
, ","
field_initializer
field_identifier "max_atomic_width"
: ":"
call_expression
identifier "Some"
arguments
( "("
integer_literal "32"
) ")"
, ","
base_field_initializer
.. ".."
call_expression
scoped_identifier
scoped_identifier
identifier "base"
:: "::"
identifier "linux_gnu"
:: "::"
identifier "opts"
arguments
( "("
) ")"
} "}"
, ","
} "}"
} "}"