Skip to content

Commit 3b4f777

Browse files
committed
Merge remote-tracking branch 'origin' into fmt-int-speed
2 parents 8d5614a + a48e7b0 commit 3b4f777

File tree

1,380 files changed

+52560
-14527
lines changed

Some content is hidden

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

1,380 files changed

+52560
-14527
lines changed

Diff for: .github/pull_request_template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ tracking issue or there are none, feel free to ignore this.
77
This PR will get automatically assigned to a reviewer. In case you would like
88
a specific user to review your work, you can assign it to them by using
99
10-
r\? <reviewer name> (with the `\` removed)
10+
r? <reviewer name>
1111
-->
1212
<!-- homu-ignore:end -->

Diff for: .github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# and also on pushes to special branches (auto, try).
33
#
44
# The actual definition of the executed jobs is calculated by a Python
5-
# script located at src/ci/github-actions/calculate-job-matrix.py, which
5+
# script located at src/ci/github-actions/ci.py, which
66
# uses job definition data from src/ci/github-actions/jobs.yml.
77
# You should primarily modify the `jobs.yml` file if you want to modify
88
# what jobs are executed in CI.
@@ -56,18 +56,18 @@ jobs:
5656
- name: Calculate the CI job matrix
5757
env:
5858
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
59-
run: python3 src/ci/github-actions/calculate-job-matrix.py >> $GITHUB_OUTPUT
59+
run: python3 src/ci/github-actions/ci.py calculate-job-matrix >> $GITHUB_OUTPUT
6060
id: jobs
6161
job:
62-
name: ${{ matrix.name }}
62+
name: ${{ matrix.full_name }}
6363
needs: [ calculate_matrix ]
6464
runs-on: "${{ matrix.os }}"
6565
defaults:
6666
run:
6767
shell: ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}
6868
timeout-minutes: 360
6969
env:
70-
CI_JOB_NAME: ${{ matrix.image }}
70+
CI_JOB_NAME: ${{ matrix.name }}
7171
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
7272
# commit of PR sha or commit sha. `GITHUB_SHA` is not accurate for PRs.
7373
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
@@ -233,7 +233,7 @@ jobs:
233233
env:
234234
DATADOG_SITE: datadoghq.com
235235
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
236-
DD_GITHUB_JOB_NAME: ${{ matrix.name }}
236+
DD_GITHUB_JOB_NAME: ${{ matrix.full_name }}
237237
run: |
238238
cd src/ci
239239
npm ci

Diff for: Cargo.lock

+5-8
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,6 @@ name = "anyhow"
185185
version = "1.0.95"
186186
source = "registry+https://github.com/rust-lang/crates.io-index"
187187
checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04"
188-
dependencies = [
189-
"backtrace",
190-
]
191188

192189
[[package]]
193190
name = "ar_archive_writer"
@@ -544,7 +541,7 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
544541

545542
[[package]]
546543
name = "clippy"
547-
version = "0.1.85"
544+
version = "0.1.86"
548545
dependencies = [
549546
"anstream",
550547
"cargo_metadata 0.18.1",
@@ -575,7 +572,7 @@ dependencies = [
575572

576573
[[package]]
577574
name = "clippy_config"
578-
version = "0.1.85"
575+
version = "0.1.86"
579576
dependencies = [
580577
"clippy_utils",
581578
"itertools",
@@ -600,7 +597,7 @@ dependencies = [
600597

601598
[[package]]
602599
name = "clippy_lints"
603-
version = "0.1.85"
600+
version = "0.1.86"
604601
dependencies = [
605602
"arrayvec",
606603
"cargo_metadata 0.18.1",
@@ -623,7 +620,7 @@ dependencies = [
623620

624621
[[package]]
625622
name = "clippy_utils"
626-
version = "0.1.85"
623+
version = "0.1.86"
627624
dependencies = [
628625
"arrayvec",
629626
"itertools",
@@ -4118,7 +4115,6 @@ name = "rustc_middle"
41184115
version = "0.0.0"
41194116
dependencies = [
41204117
"bitflags",
4121-
"derive-where",
41224118
"either",
41234119
"field-offset",
41244120
"gsgdt",
@@ -4162,6 +4158,7 @@ dependencies = [
41624158
"rustc_apfloat",
41634159
"rustc_arena",
41644160
"rustc_ast",
4161+
"rustc_attr_parsing",
41654162
"rustc_data_structures",
41664163
"rustc_errors",
41674164
"rustc_fluent_macro",

Diff for: RELEASES.md

+117-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,119 @@
1+
Version 1.84.0 (2025-01-09)
2+
==========================
3+
4+
<a id="
5+
Language"></a>
6+
7+
Language
8+
--------
9+
- [Allow `#[deny]` inside `#[forbid]` as a no-op](https://github.com/rust-lang/rust/pull/121560/)
10+
- [Show a warning when `-Ctarget-feature` is used to toggle features that can lead to unsoundness due to ABI mismatches](https://github.com/rust-lang/rust/pull/129884)
11+
- [Use the next-generation trait solver in coherence](https://github.com/rust-lang/rust/pull/130654)
12+
- [Allow coercions to drop the principal of trait objects](https://github.com/rust-lang/rust/pull/131857)
13+
- [Support `/` as the path separator for `include!()` in all cases on Windows](https://github.com/rust-lang/rust/pull/125205)
14+
- [Taking a raw ref (`raw (const|mut)`) of a deref of a pointer (`*ptr`) is now safe](https://github.com/rust-lang/rust/pull/129248)
15+
- [Stabilize s390x inline assembly](https://github.com/rust-lang/rust/pull/131258)
16+
- [Stabilize Arm64EC inline assembly](https://github.com/rust-lang/rust/pull/131781)
17+
- [Lint against creating pointers to immediately dropped temporaries](https://github.com/rust-lang/rust/pull/128985)
18+
- [Execute drop glue when unwinding in an `extern "C"` function](https://github.com/rust-lang/rust/pull/129582)
19+
20+
<a id="1.84.0-Compiler"></a>
21+
22+
Compiler
23+
--------
24+
- [Add `--print host-tuple` flag to print the host target tuple and affirm the "target tuple" terminology over "target triple"](https://github.com/rust-lang/rust/pull/125579)
25+
- [Declaring functions with a calling convention not supported on the current target now triggers a hard error](https://github.com/rust-lang/rust/pull/129935)
26+
- [Set up indirect access to external data for `loongarch64-unknown-linux-{musl,ohos}`](https://github.com/rust-lang/rust/pull/131583)
27+
- [Enable XRay instrumentation for LoongArch Linux targets](https://github.com/rust-lang/rust/pull/131818)
28+
- [Extend the `unexpected_cfgs` lint to also warn in external macros](https://github.com/rust-lang/rust/pull/132577)
29+
- [Stabilize WebAssembly `multivalue`, `reference-types`, and `tail-call` target features](https://github.com/rust-lang/rust/pull/131080)
30+
- [Added Tier 2 support for the `wasm32v1-none` target](https://github.com/rust-lang/rust/pull/131487)
31+
32+
<a id="1.84.0-Libraries"></a>
33+
34+
Libraries
35+
---------
36+
- [Implement `From<&mut {slice}>` for `Box/Rc/Arc<{slice}>`](https://github.com/rust-lang/rust/pull/129329)
37+
- [Move `<float>::copysign`, `<float>::abs`, `<float>::signum` to `core`](https://github.com/rust-lang/rust/pull/131304)
38+
- [Add `LowerExp` and `UpperExp` implementations to `NonZero`](https://github.com/rust-lang/rust/pull/131377)
39+
- [Implement `FromStr` for `CString` and `TryFrom<CString>` for `String`](https://github.com/rust-lang/rust/pull/130608)
40+
- [`std::os::darwin` has been made public](https://github.com/rust-lang/rust/pull/123723)
41+
42+
<a id="1.84.0-Stabilized-APIs"></a>
43+
44+
Stabilized APIs
45+
---------------
46+
47+
- [`Ipv6Addr::is_unique_local`](https://doc.rust-lang.org/stable/core/net/struct.Ipv6Addr.html#method.is_unique_local)
48+
- [`Ipv6Addr::is_unicast_link_local`](https://doc.rust-lang.org/stable/core/net/struct.Ipv6Addr.html#method.is_unicast_link_local)
49+
- [`core::ptr::with_exposed_provenance`](https://doc.rust-lang.org/stable/core/ptr/fn.with_exposed_provenance.html)
50+
- [`core::ptr::with_exposed_provenance_mut`](https://doc.rust-lang.org/stable/core/ptr/fn.with_exposed_provenance_mut.html)
51+
- [`<ptr>::addr`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.addr)
52+
- [`<ptr>::expose_provenance`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.expose_provenance)
53+
- [`<ptr>::with_addr`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.with_addr)
54+
- [`<ptr>::map_addr`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.map_addr)
55+
- [`<int>::isqrt`](https://doc.rust-lang.org/stable/core/primitive.i32.html#method.isqrt)
56+
- [`<int>::checked_isqrt`](https://doc.rust-lang.org/stable/core/primitive.i32.html#method.checked_isqrt)
57+
- [`<uint>::isqrt`](https://doc.rust-lang.org/stable/core/primitive.u32.html#method.isqrt)
58+
- [`NonZero::isqrt`](https://doc.rust-lang.org/stable/core/num/struct.NonZero.html#impl-NonZero%3Cu128%3E/method.isqrt)
59+
- [`core::ptr::without_provenance`](https://doc.rust-lang.org/stable/core/ptr/fn.without_provenance.html)
60+
- [`core::ptr::without_provenance_mut`](https://doc.rust-lang.org/stable/core/ptr/fn.without_provenance_mut.html)
61+
- [`core::ptr::dangling`](https://doc.rust-lang.org/stable/core/ptr/fn.dangling.html)
62+
- [`core::ptr::dangling_mut`](https://doc.rust-lang.org/stable/core/ptr/fn.dangling_mut.html)
63+
- [`Pin::as_deref_mut`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.as_deref_mut)
64+
65+
These APIs are now stable in const contexts
66+
67+
- [`AtomicBool::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicBool.html#method.from_ptr)
68+
- [`AtomicPtr::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicPtr.html#method.from_ptr)
69+
- [`AtomicU8::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicU8.html#method.from_ptr)
70+
- [`AtomicU16::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicU16.html#method.from_ptr)
71+
- [`AtomicU32::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicU32.html#method.from_ptr)
72+
- [`AtomicU64::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicU64.html#method.from_ptr)
73+
- [`AtomicUsize::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicUsize.html#method.from_ptr)
74+
- [`AtomicI8::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicI8.html#method.from_ptr)
75+
- [`AtomicI16::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicI16.html#method.from_ptr)
76+
- [`AtomicI32::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicI32.html#method.from_ptr)
77+
- [`AtomicI64::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicI64.html#method.from_ptr)
78+
- [`AtomicIsize::from_ptr`](https://doc.rust-lang.org/stable/core/sync/atomic/struct.AtomicIsize.html#method.from_ptr)
79+
- [`<ptr>::is_null`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.is_null-1)
80+
- [`<ptr>::as_ref`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.as_ref-1)
81+
- [`<ptr>::as_mut`](https://doc.rust-lang.org/stable/core/primitive.pointer.html#method.as_mut)
82+
- [`Pin::new`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.new)
83+
- [`Pin::new_unchecked`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.new_unchecked)
84+
- [`Pin::get_ref`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.get_ref)
85+
- [`Pin::into_ref`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.into_ref)
86+
- [`Pin::get_mut`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.get_mut)
87+
- [`Pin::get_unchecked_mut`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.get_unchecked_mut)
88+
- [`Pin::static_ref`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.static_ref)
89+
- [`Pin::static_mut`](https://doc.rust-lang.org/stable/core/pin/struct.Pin.html#method.static_mut)
90+
91+
<a id="1.84.0-Cargo"></a>
92+
93+
Cargo
94+
-----
95+
- [Stabilize MSRV-aware resolver config](https://github.com/rust-lang/cargo/pull/14639/)
96+
- [Stabilize resolver v3](https://github.com/rust-lang/cargo/pull/14754/)
97+
98+
<a id="1.84-Rustdoc"></a>
99+
100+
Rustdoc
101+
-------
102+
103+
- [rustdoc-search: improve type-driven search](https://github.com/rust-lang/rust/pull/127589)
104+
105+
<a id="1.84.0-Compatibility-Notes"></a>
106+
107+
Compatibility Notes
108+
-------------------
109+
- [Enable by default the `LSX` target feature for LoongArch Linux targets](https://github.com/rust-lang/rust/pull/132140)
110+
- [The unstable `-Zprofile` flag (“gcov-style” coverage instrumentation) has been removed.](https://github.com/rust-lang/rust/pull/131829) This does not affect the stable flags for coverage instrumentation (`-Cinstrument-coverage`) and profile-guided optimization (`-Cprofile-generate`, `-Cprofile-use`), which are unrelated and remain available.
111+
- Support for the target named `wasm32-wasi` has been removed as the target is now named `wasm32-wasip1`. This completes the [transition](https://github.com/rust-lang/compiler-team/issues/607) [plan](https://github.com/rust-lang/compiler-team/issues/695) for this target following [the introduction of `wasm32-wasip1`](https://github.com/rust-lang/rust/pull/120468) in Rust 1.78. Compiler warnings on [use of `wasm32-wasi`](https://github.com/rust-lang/rust/pull/126662) introduced in Rust 1.81 are now gone as well as the target is removed.
112+
- [The syntax `&pin (mut|const) T` is now parsed as a type which in theory could affect macro expansion results in some edge cases](https://github.com/rust-lang/rust/pull/130635#issuecomment-2375462821)
113+
- [Legacy syntax for calling `std::arch` functions is no longer permitted to declare items or bodies (such as closures, inline consts, or async blocks).](https://github.com/rust-lang/rust/pull/130443#issuecomment-2445678945)
114+
- [Declaring functions with a calling convention not supported on the current target now triggers a hard error](https://github.com/rust-lang/rust/pull/129935)
115+
- [The next-generation trait solver is now enabled for coherence, fixing multiple soundness issues](https://github.com/rust-lang/rust/pull/130654)
116+
1117
Version 1.83.0 (2024-11-28)
2118
==========================
3119

@@ -2067,7 +2183,7 @@ Language
20672183
--------
20682184

20692185
- [Stabilize default_alloc_error_handler](https://github.com/rust-lang/rust/pull/102318/)
2070-
This allows usage of `alloc` on stable without requiring the
2186+
This allows usage of `alloc` on stable without requiring the
20712187
definition of a handler for allocation failure. Defining custom handlers is still unstable.
20722188
- [Stabilize `efiapi` calling convention.](https://github.com/rust-lang/rust/pull/105795/)
20732189
- [Remove implicit promotion for types with drop glue](https://github.com/rust-lang/rust/pull/105085/)

Diff for: compiler/rustc_abi/src/extern_abi/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ pub fn is_enabled(
192192
s
193193
}
194194

195+
/// Returns whether the ABI is stable to use.
196+
///
197+
/// Note that there is a separate check determining whether the ABI is even supported
198+
/// on the current target; see `fn is_abi_supported` in `rustc_target::spec`.
195199
pub fn is_stable(name: &str) -> Result<(), AbiDisabled> {
196200
match name {
197201
// Stable

Diff for: compiler/rustc_abi/src/layout.rs

+36-7
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
119119
.chain(Niche::from_scalar(dl, Size::ZERO, a))
120120
.max_by_key(|niche| niche.available(dl));
121121

122+
let combined_seed = a.size(&self.cx).bytes().wrapping_add(b.size(&self.cx).bytes());
123+
122124
LayoutData {
123125
variants: Variants::Single { index: VariantIdx::new(0) },
124126
fields: FieldsShape::Arbitrary {
@@ -131,6 +133,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
131133
size,
132134
max_repr_align: None,
133135
unadjusted_abi_align: align.abi,
136+
randomization_seed: combined_seed,
134137
}
135138
}
136139

@@ -223,6 +226,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
223226
size: Size::ZERO,
224227
max_repr_align: None,
225228
unadjusted_abi_align: dl.i8_align.abi,
229+
randomization_seed: 0,
226230
}
227231
}
228232

@@ -385,6 +389,11 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
385389
return Err(LayoutCalculatorError::EmptyUnion);
386390
};
387391

392+
let combined_seed = only_variant
393+
.iter()
394+
.map(|v| v.randomization_seed)
395+
.fold(repr.field_shuffle_seed, |acc, seed| acc.wrapping_add(seed));
396+
388397
Ok(LayoutData {
389398
variants: Variants::Single { index: only_variant_idx },
390399
fields: FieldsShape::Union(union_field_count),
@@ -394,6 +403,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
394403
size: size.align_to(align.abi),
395404
max_repr_align,
396405
unadjusted_abi_align,
406+
randomization_seed: combined_seed,
397407
})
398408
}
399409

@@ -650,6 +660,11 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
650660
BackendRepr::Memory { sized: true }
651661
};
652662

663+
let combined_seed = variant_layouts
664+
.iter()
665+
.map(|v| v.randomization_seed)
666+
.fold(repr.field_shuffle_seed, |acc, seed| acc.wrapping_add(seed));
667+
653668
let layout = LayoutData {
654669
variants: Variants::Multiple {
655670
tag: niche_scalar,
@@ -671,6 +686,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
671686
align,
672687
max_repr_align,
673688
unadjusted_abi_align,
689+
randomization_seed: combined_seed,
674690
};
675691

676692
Some(TmpLayout { layout, variants: variant_layouts })
@@ -961,6 +977,11 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
961977

962978
let largest_niche = Niche::from_scalar(dl, Size::ZERO, tag);
963979

980+
let combined_seed = layout_variants
981+
.iter()
982+
.map(|v| v.randomization_seed)
983+
.fold(repr.field_shuffle_seed, |acc, seed| acc.wrapping_add(seed));
984+
964985
let tagged_layout = LayoutData {
965986
variants: Variants::Multiple {
966987
tag,
@@ -978,6 +999,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
978999
size,
9791000
max_repr_align,
9801001
unadjusted_abi_align,
1002+
randomization_seed: combined_seed,
9811003
};
9821004

9831005
let tagged_layout = TmpLayout { layout: tagged_layout, variants: layout_variants };
@@ -1030,12 +1052,15 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
10301052
let mut max_repr_align = repr.align;
10311053
let mut inverse_memory_index: IndexVec<u32, FieldIdx> = fields.indices().collect();
10321054
let optimize_field_order = !repr.inhibit_struct_field_reordering();
1033-
if optimize_field_order && fields.len() > 1 {
1034-
let end =
1035-
if let StructKind::MaybeUnsized = kind { fields.len() - 1 } else { fields.len() };
1036-
let optimizing = &mut inverse_memory_index.raw[..end];
1037-
let fields_excluding_tail = &fields.raw[..end];
1055+
let end = if let StructKind::MaybeUnsized = kind { fields.len() - 1 } else { fields.len() };
1056+
let optimizing = &mut inverse_memory_index.raw[..end];
1057+
let fields_excluding_tail = &fields.raw[..end];
1058+
// unsizable tail fields are excluded so that we use the same seed for the sized and unsized layouts.
1059+
let field_seed = fields_excluding_tail
1060+
.iter()
1061+
.fold(0u64, |acc, f| acc.wrapping_add(f.randomization_seed));
10381062

1063+
if optimize_field_order && fields.len() > 1 {
10391064
// If `-Z randomize-layout` was enabled for the type definition we can shuffle
10401065
// the field ordering to try and catch some code making assumptions about layouts
10411066
// we don't guarantee.
@@ -1046,8 +1071,9 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
10461071
use rand::seq::SliceRandom;
10471072
// `ReprOptions.field_shuffle_seed` is a deterministic seed we can use to randomize field
10481073
// ordering.
1049-
let mut rng =
1050-
rand_xoshiro::Xoshiro128StarStar::seed_from_u64(repr.field_shuffle_seed);
1074+
let mut rng = rand_xoshiro::Xoshiro128StarStar::seed_from_u64(
1075+
field_seed.wrapping_add(repr.field_shuffle_seed),
1076+
);
10511077

10521078
// Shuffle the ordering of the fields.
10531079
optimizing.shuffle(&mut rng);
@@ -1344,6 +1370,8 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
13441370
unadjusted_abi_align
13451371
};
13461372

1373+
let seed = field_seed.wrapping_add(repr.field_shuffle_seed);
1374+
13471375
Ok(LayoutData {
13481376
variants: Variants::Single { index: VariantIdx::new(0) },
13491377
fields: FieldsShape::Arbitrary { offsets, memory_index },
@@ -1353,6 +1381,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
13531381
size,
13541382
max_repr_align,
13551383
unadjusted_abi_align,
1384+
randomization_seed: seed,
13561385
})
13571386
}
13581387

0 commit comments

Comments
 (0)